/* --- RESET & BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    padding: 30px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

/* --- DASHBOARD HUB STYLES --- */
.global-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.global-header h1 {
    font-size: 26px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.global-header p {
    font-size: 14px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.tool-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
    text-decoration: none;
    color: inherit;
    position: relative;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.card-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

.card-status {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 11px;
    font-weight: 600;
    background: #d1fae5;
    color: #065f46;
    padding: 2px 10px;
    border-radius: 20px;
}

.tool-card h3 {
    font-size: 18px;
    color: #0f172a;
    margin-bottom: 10px;
}

.tool-card p {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.tool-card .action-link {
    font-size: 13px;
    font-weight: 600;
    color: #007bff;
    transition: color 0.2s;
}

.active-card:hover {
    transform: translateY(-5px);
    border-color: #007bff;
    box-shadow: 0 12px 24px rgba(0, 123, 255, 0.1);
}

/* --- FOOTER STYLES (AdSense Ready) --- */
footer {
    margin-top: auto;
    padding: 40px 0;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    width: 100%;
}

footer a {
    color: #64748b;
    font-size: 14px;
    margin: 0 10px;
    text-decoration: none;
}

footer a:hover {
    color: #007bff;
    text-decoration: underline;
}

/* --- COMPRESSOR PAGE STYLES (Reference) --- */
.workspace-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
}

.panel-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.panel-card h3 {
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
}

.upload-zone {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 8px;
    padding: 30px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

.upload-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.browse-btn {
    color: #007bff;
    cursor: pointer;
}

.metrics-panel {
    display: flex;
    justify-content: space-between;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
}

.metric-box span {
    font-size: 11px;
    color: #64748b;
    display: block;
}

.metric-box strong {
    font-size: 14px;
    color: #1e293b;
}

.control-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #475569;
}

.input-with-unit {
    display: flex;
}

.input-with-unit input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 6px 0 0 6px;
    padding: 10px;
    outline: none;
}

.input-with-unit select, .control-group select {
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: 10px;
    outline: none;
}

.input-with-unit select {
    border-left: none;
    border-radius: 0 6px 6px 0;
}

.control-group select {
    width: 100%;
    border-radius: 6px;
}

.main-action-btn {
    width: 100%;
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
}

.main-action-btn:hover {
    background: #0056b3;
}

.final-metrics {
    background: #ecfdf5;
    margin-bottom: 15px;
}

.final-metrics strong {
    color: #065f46;
}

.preview-wrapper {
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.preview-wrapper img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}

.download-btn {
    display: block;
    text-align: center;
    background: #10b981;
    color: #fff;
    text-decoration: none;
    padding: 12px;
    font-weight: 600;
    border-radius: 6px;
}

.download-btn:hover {
    background: #059669;
}

.placeholder-card {
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed #e2e8f0;
    background: #fff;
}

.placeholder-content {
    text-align: center;
    color: #94a3b8;
}

.placeholder-content span {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

/* --- RESPONSIVE HACK --- */
@media (max-width: 768px) {
    .workspace-container {
        grid-template-columns: 1fr;
    }
}