@import 'resize.css';
@import 'merge-sorting.css';

:root {
    /* Colors - Premium Palette */
    --bg-dark: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-hover: #334155;
    --primary-color: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-color: #10b981;
    --error-color: #ef4444;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.3);
}

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

html,
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

#root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.025em;
}

.logo i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a.active {
    color: var(--primary-color);
}

/* Secondary Nav (Breadcrumbs) */
#secondary-nav {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 1rem 5% 0;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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


/* Main Content */
#main-content {
    flex: 1;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    background: #0f172a;
}

/* Utilities */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: #64748b;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: transform 0.3s, border-color 0.3s;
}

.hidden {
    display: none !important;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 1rem;
    padding: 4rem 0 1rem 0;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(to right, #ffffff 20%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.tool-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: var(--bg-surface-hover);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.icon-wrapper {
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.tool-card:hover .icon-wrapper {
    transform: scale(1.1);
    background: rgba(99, 102, 241, 0.2);
}

.icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Tool Container */
.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.header-group {
    margin-bottom: 3rem;
}

.header-group h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.tool-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Dropzone */
.dropzone {
    /* Standard or fallback */
    background: var(--bg-surface);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.premium-dropzone {
    padding: 4rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Dropzone Active State */
.premium-dropzone.drag-active {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

/* File Grid & Items */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.file-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: grab;
    user-select: none;
}

.file-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.file-card:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.file-thumb {
    width: 100%;
    aspect-ratio: 1/1.414;
    /* A4 aspect ratio */
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.file-thumb canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Page Count Badge */
.page-count-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.file-info-compact {
    width: 100%;
}

.file-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.remove-btn-floating {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    width: 28px;
    height: 28px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.remove-btn-floating svg {
    width: 14px;
    height: 14px;
}

.file-card:hover .remove-btn-floating {
    opacity: 1;
    transform: scale(1.1);
}

.drag-handle {
    display: none;
    /* Card itself is draggable */
}

/* Restore regular file-item for other views */
.file-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}


/* Action Bar */
.action-bar {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.btn-large {
    font-size: 1.1rem;
    padding: 1rem 4rem;
    min-width: 240px;
}

/* Inputs */
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
    white-space: nowrap;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Features Section */
/* Features Section (Full Width Band) */
/* Features Section (Full Width Band) */
.features-section {
    background: #111827;
    padding: 6rem 0;
    margin: 6rem 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
    /* Ensure padding doesn't add width */
}

/* About Grid Responsive */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

/* Ensure content stays centered within the full-width band */
.features-section .section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

/* Force 4 columns on standard laptops and up */
@media (min-width: 1000px) {
    .tools-grid.top-tools {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* Features Grid Alignment */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
}

.feature-icon svg {
    width: 40px;
    height: 40px;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-main);
}

.feature-card p {
    color: var(--text-muted);
}

/* Mobile Menu - Premium Design */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 2001;
    /* Above overlay */
}

.mobile-menu-btn svg {
    width: 32px;
    height: 32px;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6rem 2rem 2rem;
    /* Top padding for close btn area */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    color: var(--text-main);
    transform: rotate(90deg);
}

.mobile-menu-close svg {
    width: 32px;
    height: 32px;
}

.mobile-nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    padding: 0.5rem 0;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s;
}

/* Staggered Animation for Links */
.mobile-menu-overlay.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(2) {
    transition-delay: 0.1s;
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(3) {
    transition-delay: 0.2s;
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(4) {
    transition-delay: 0.3s;
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(5) {
    transition-delay: 0.4s;
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(6) {
    transition-delay: 0.5s;
}

.mobile-nav-link:hover {
    color: white;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    background: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .navbar {
        padding: 1rem 5%;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Force Section Titles to Center */
.section-title {
    display: block !important;
    text-align: center !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Split Tool Specific Styles */
.segmented-control {
    display: inline-flex;
    background: rgba(30, 41, 59, 0.5);
    padding: 0.25rem;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
    backdrop-filter: blur(8px);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.segmented-control button {
    background: transparent;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 99px;
    color: var(--text-muted);
    font-weight: 500;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.segmented-control button.active {
    background: var(--bg-surface);
    color: var(--text-main);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.segmented-control button:hover:not(.active) {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
}

.page-card {
    background: var(--bg-surface);
    border: 2px solid transparent;
    /* Prepare for border change */
    border-radius: var(--radius-md);
    padding: 0.5rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    aspect-ratio: 1/1.414;
}

.page-card canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.page-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.page-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.check-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.check-indicator svg {
    width: 14px;
    height: 14px;
    stroke-width: 3px;
}

.page-card.selected .check-indicator {
    opacity: 1;
    transform: scale(1);
}

.page-number {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

.hint {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.range-controls {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.range-controls label {
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-main);
}

/* Ensure Tool Grid is centered */
.tools-grid {
    justify-content: center;
    margin: 0 auto;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.5;
    text-align: left;
}

.alert-warning {
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

/* Sticky Toolbar for Editors */
.sticky-toolbar {
    background: var(--bg-surface);
    padding: 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    position: sticky;
    top: 10px;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* =========================================
   Compress Tool Styles
   ========================================= */

.compression-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.compression-card {
    position: relative;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.compression-card:hover {
    transform: translateY(-2px);
}

.compression-card .hidden-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.compression-card .card-content {
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    height: 100%;
    transition: all 0.2s ease;
    position: relative;
}

/* Selected State */
.compression-card .hidden-radio:checked+.card-content {
    border-color: var(--primary-color);
    background: linear-gradient(to bottom right, var(--bg-surface), rgba(99, 102, 241, 0.03));
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.compression-card .check-circle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.compression-card .hidden-radio:checked+.card-content .check-circle {
    opacity: 1;
    transform: scale(1);
}

.compression-card h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 600;
}

.compression-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.compression-card .level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.compression-card .est-size {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Badges */
.badge-success,
.badge-warning,
.badge-primary {
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-warning {
    background: rgba(234, 179, 8, 0.1);
    color: #ca8a04;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.2);
}