:root {
    --primary: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.4);
    --bg-app: #020617;
    --bg-sidebar: rgba(15, 23, 42, 0.95);
    --bg-glass: rgba(30, 41, 59, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --font-main: 'Outfit', 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --primary-gradient: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

a {
    transition: var(--transition);
    color: inherit;
}

body {
    background: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 0;
    z-index: 100;
}

.search-wrapper {
    padding: 0 1.5rem;
    position: relative;
    margin-bottom: 1rem;
}

.search-wrapper i {
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-wrapper input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 0.8rem;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.search-wrapper input:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.9);
}


.nav-menu {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-separator {
    padding: 1.2rem 2rem 0.4rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.nav-separator:hover {
    color: var(--text-primary);
}

.nav-separator .toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-separator.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.nav-group {
    max-height: 1000px;
    /* Large enough for any group */
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.nav-group.collapsing {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-group.collapsed {
    max-height: 0;
}

.nav-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(14, 165, 233, 0.3), transparent);
}


.nav-item {
    width: 100%;
    padding: 0.65rem 2rem;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid transparent;
    text-align: left;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(14, 165, 233, 0.1);
    border-left-color: var(--primary);
}

.sidebar-footer {
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border-glass);
    background: var(--bg-sidebar);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.9;
}

.scroll-indicator:hover {
    opacity: 1;
    transform: translateY(2px);
}

.scroll-indicator i {
    font-size: 0.85rem;
    animation: scrollBounce 2s infinite;
}

.sidebar-footer.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

@keyframes scrollBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-3px);
    }

    60% {
        transform: translateY(-1px);
    }
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.05), transparent);
}

.top-bar {
    padding: 1.2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.logo:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.logo i {
    color: var(--primary);
    font-size: 1.4rem;
}

.btn-icon-top {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    /* Hidden on desktop */
}


.status-badge {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    padding: 0.5rem 1.2rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Top Navbar */
.top-nav {
    display: flex;
    gap: 2rem;
    margin-left: 2rem;
    flex: 1;
    justify-content: center;
}

.top-nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.top-nav-item i {
    font-size: 0.8rem;
    opacity: 0.7;
}

.top-nav-item:hover {
    color: var(--primary);
}

/* Dropdown Styles */
.top-nav-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    /* Darker bg for contrast */
    border: 1px solid var(--border-glass);
    min-width: 220px;
    z-index: 1000;
    border-radius: 0.8rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

.top-nav-dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-menu a {
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
}

.dropdown-menu a i {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.top-nav-item.active {
    color: var(--primary);
}

@media (max-width: 1300px) {
    .top-nav {
        display: none;
        /* Hide on smaller desktops to avoid crowding */
    }
}

.workspace {
    padding: 2.5rem 3rem;
    flex: 1;
}

/* Dashboard / Home Grid View */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    animation: fadeIn 0.5s ease-out;
}

.category-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

.tool-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 1.2rem;
    padding: 1.8rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.tool-card i {
    font-size: 2.2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.tool-card span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.tool-card:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Editor View */
.editor-view {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    animation: slideUp 0.5s ease-out;
}

.upload-zone {
    width: 100%;
    height: 350px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.upload-zone:hover,
.upload-zone.drag-active {
    border-color: var(--primary);
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.15);
}

.upload-content {
    text-align: center;
    z-index: 2;
}

.upload-icon-pulse {
    background: rgba(14, 165, 233, 0.1);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.upload-icon-pulse i {
    font-size: 2.8rem;
    color: var(--primary);
    filter: drop-shadow(0 0 15px rgba(14, 165, 233, 0.6));
    animation: none;
    transition: all 0.4s ease;
}

.upload-zone:hover .upload-icon-pulse {
    transform: scale(1.1) rotate(0deg);
    background: rgba(14, 165, 233, 0.2);
    border-color: var(--primary);
}

.upload-zone:hover .upload-icon-pulse i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px var(--primary));
}

.upload-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.limit-hint {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.workspace-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
}

.preview-area {
    background: var(--bg-glass);
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-glass);
    min-height: 400px;
}

.image-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.image-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1.2rem;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    padding: 1.5rem;
}

.image-card-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.image-original-box h4,
.image-processed-box h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.image-wrapper {
    background: #000;
    border-radius: 0.8rem;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-glass);
    margin-bottom: 0.5rem;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-placeholder {
    flex-direction: column;
    background: rgba(15, 23, 42, 0.4);
}

.image-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    gap: 0.5rem;
}

.image-actions {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
}

.btn-download-inline {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    color: #fff;
    border: none;
    border-radius: 0.8rem;
    padding: 0.8rem 2rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-download-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}


/* Controls */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    border-radius: 1.8rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 6rem;
}

.section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-wrapper input,
select {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: 0.8rem;
    padding: 0.8rem 1rem;
    color: #fff;
    outline: none;
    font-size: 1rem;
    transition: var(--transition);
}

.input-wrapper input:focus,
select:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.9);
}

.format-toggle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.4rem;
    border-radius: 1rem;
}

.format-toggle input {
    display: none;
}

.format-toggle label {
    padding: 0.7rem;
    text-align: center;
    border-radius: 0.7rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.format-toggle input:checked+label {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary,
.btn-success {
    padding: 1.2rem;
    border-radius: 1rem;
    border: none;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-primary:hover,
.btn-success:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 0.8rem 1.2rem;
    border-radius: 0.8rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-outline.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.toggle-row {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.action-footer {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-glass);
}

.action-footer button {
    width: 100%;
}

/* Results */
.results-area {
    margin-top: 3rem;
    background: var(--bg-glass);
    padding: 2.5rem;
    border-radius: 2rem;
    border: 1px solid var(--border-glass);
    width: 100%;
}


.result-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
    grid-column: span 2;
    /* Make it wider */
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    /* Wider cards for side-by-side */
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

.result-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.result-image-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-image-box h4 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.result-image-wrapper {
    background: #000;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    aspect-ratio: 1;
    /* Keep square or flexible? */
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 400px;
}

.result-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.result-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    border: 1px solid var(--border-glass);
}

.size-badge {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.size-badge .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.size-badge .value {
    font-weight: 600;
    color: var(--text-primary);
}

.size-badge .reduction {
    font-size: 0.75rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.size-badge .increase {
    font-size: 0.75rem;
    color: #ef4444;
}

.btn-download-large {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    color: #fff;
    border: none;
    border-radius: 0.8rem;
    padding: 0.8rem 2rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-download-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}


.btn-download-sm {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.6rem;
    font-weight: 600;
    cursor: pointer;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-glass);
    border-radius: 2.5rem;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
}

.crop-container {
    padding: 2rem;
    background: #000;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utils */
.hidden {
    display: none !important;
}

.mt-1 {
    margin-top: 1rem;
}


.format-toggle label {
    padding: 0.7rem;
    text-align: center;
    border-radius: 0.7rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.format-toggle input:checked+label {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary,
.btn-success {
    padding: 1.2rem;
    border-radius: 1rem;
    border: none;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-success {
    background: #22c55e;
    color: #fff;
}

.btn-primary:hover,
.btn-success:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 1rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

/* Results */
.results-area {
    margin-top: 3rem;
    background: var(--bg-glass);
    padding: 2.5rem;
    border-radius: 2rem;
    border: 1px solid var(--border-glass);
    width: 100%;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.result-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 1.2rem;
    padding: 1.2rem;
    border: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #000;
    border-radius: 0.8rem;
}

.btn-download-sm {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.6rem;
    font-weight: 600;
    cursor: pointer;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-glass);
    border-radius: 2.5rem;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
}

.crop-container {
    padding: 2rem;
    background: #000;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utils */
.hidden {
    display: none !important;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 1100px) {
    .sidebar {
        position: fixed;
        left: -280px;
        height: 100vh;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .sidebar.mobile-active {
        transform: translateX(280px);
    }

    .btn-icon-top {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .workspace {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* SEO Content Section */
.seo-content-section {
    margin-top: 3rem;
    padding: 2.5rem;
    line-height: 1.8;
}

.seo-content-section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.seo-content-section h3 {
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.seo-content-section ol,
.seo-content-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.seo-content-section li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.seo-content-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* New Tool Controls */
.btn-group-row {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.btn-group-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.metadata-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
    padding: 1.2rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.placeholder-text {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

.signature-wrapper {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    margin-top: 0.5rem;
    border: 1px solid var(--border-glass);
}

#signature-canvas {
    width: 100%;
    height: 150px;
    cursor: crosshair;
    display: block;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem;
    border-radius: 1rem;
    border: 1px solid var(--border-glass);
}

input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 2px solid #fff;
    border-radius: 50%;
}

#bg-color-label {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .tool-cards {
        grid-template-columns: 1fr;
    }

    .workspace-layout {
        grid-template-columns: 1fr;
    }

    .top-bar {
        padding: 1rem;
    }

    .top-bar h1 {
        font-size: 1.2rem;
    }

    .status-badge {
        display: none;
    }
}