:root {
    /* Brand Colors - Standardized for C44C */
    --primary-color: #10b981;
    /* Green theme for Image tools */
    --primary-hover: #059669;
    --bg-color: #f8fafc;
    --surface-color: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;

    --error-color: #ef4444;

    /* Spacing */
    --nav-height: 72px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, blinkmacsystemfont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Global Navbar (Reused from standard) --- */
.global-navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links { display: flex; gap: 1.5rem; align-items: center; }

.nav-link { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); transition: 0.3s; white-space: nowrap; }

.nav-link:hover,
.nav-link.active { color: var(--primary-color); font-weight: 600; }

.nav-link.active { color: var(--primary-color); font-weight: 600; }

/* --- Tool Specific Sub-Navigation --- */
.tool-subnav {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    overflow-x: auto;
    white-space: nowrap;
}

.subnav-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    padding: 16px 0;
}

.subnav-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding-bottom: 16px;
    /* align with bottom border visually */
    margin-bottom: -16px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.subnav-item:hover {
    color: var(--text-primary);
}

.subnav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}


/* --- Main Workspace Area --- */
.workspace {
    flex-grow: 1;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.workspace-header {
    text-align: center;
    margin-bottom: 40px;
}

.workspace-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.workspace-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* --- Upload Dropzone --- */
.dropzone {
    width: 100%;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    background-color: var(--surface-color);
    padding: 64px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(16, 185, 129, 0.02);
    /* Very light green */
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropzone-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dropzone-subtext {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

/* Hide file input */
#file-input {
    display: none;
}


/* --- Footer --- */
.global-footer {
    border-top: 1px solid var(--border-color);
    padding: 32px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: auto;
}
