/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #ec4899;
    --secondary-dark: #db2777;
    --accent: #06b6d4;
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gray-950: #030712;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --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 40px var(--primary-glow);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-950);
    color: var(--gray-100);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.3), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(236, 72, 153, 0.2), transparent),
        radial-gradient(ellipse 40% 30% at 0% 100%, rgba(6, 182, 212, 0.15), transparent);
    pointer-events: none;
    z-index: -1;
}

/* Floating Orbs Animation */
.floating-orbs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 25s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: -8s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 40%;
    left: 30%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -60px) scale(1.1); }
    50% { transform: translate(-40px, 40px) scale(0.9); }
    75% { transform: translate(-60px, -40px) scale(1.05); }
}

/* Grid Pattern Overlay */
.grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

/* Header */
.header {
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 36px;
    height: 36px;
    padding: 7px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    color: white;
}

.nav-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content */
.main {
    flex: 1;
    padding: 2rem 0;
    position: relative;
}

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

@media (min-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr 320px;
    }
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 50%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.6s ease 0.1s both;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    .hero h1 {
        font-size: 4.5rem;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
    50% { box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(236, 72, 153, 0.2); }
}

/* Search Form */
.search-form {
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.search-input-wrapper {
    display: flex;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    background: rgba(255, 255, 255, 0.08);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.125rem;
    padding: 1rem 1.25rem;
    background: transparent;
    color: var(--white);
    min-width: 0;
}

.search-input::placeholder {
    color: var(--gray-500);
}

.search-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-button:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.search-button:active {
    transform: translateY(0);
}

.search-button svg {
    width: 20px;
    height: 20px;
}

.search-button.loading svg {
    animation: spin 1s linear infinite;
}

.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.75rem;
    text-align: left;
    padding-left: 1rem;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s ease 0.4s both;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.trust-badge svg {
    width: 20px;
    height: 20px;
    color: var(--success);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 3rem 0;
    animation: fadeInUp 0.6s ease 0.5s both;
}

@media (min-width: 768px) {
    .stats-section {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-400);
}

/* Features Grid */
.features {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--gray-400);
    max-width: 500px;
    margin: 0 auto;
}

.features h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2rem;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-6px);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.1));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary-light);
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--gray-400);
    line-height: 1.6;
}

/* Recent Searches */
.recent-searches {
    padding: 2rem 0;
}

.recent-searches h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.recent-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}

.recent-url {
    font-size: 0.875rem;
    color: var(--gray-300);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 65%;
}

.recent-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.15);
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.sidebar-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
}

.sidebar-section p {
    font-size: 0.875rem;
    color: var(--gray-400);
    line-height: 1.6;
}

.how-it-works {
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: var(--gray-400);
}

.how-it-works li {
    margin-bottom: 0.75rem;
    position: relative;
}

.how-it-works li::marker {
    color: var(--primary-light);
    font-weight: 600;
}

/* Results Page */
.results-header {
    margin-bottom: 2rem;
    animation: fadeInUp 0.4s ease;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary-light);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.results-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    word-break: break-all;
}

.results-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    animation: fadeInUp 0.4s ease 0.1s both;
}

.summary-stat {
    display: flex;
    flex-direction: column;
}

.summary-stat .stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--success), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.summary-stat .stat-label {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
}

.summary-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-lg);
}

.category-name {
    font-size: 0.875rem;
    color: var(--gray-300);
}

.category-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

/* Processors Grid */
.category-section {
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.4s ease 0.2s both;
}

.category-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.processors-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.processor-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.processor-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateX(4px);
}

.processor-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.1));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.processor-icon svg {
    width: 24px;
    height: 24px;
    color: var(--success);
}

.processor-info {
    flex: 1;
    min-width: 0;
}

.processor-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.processor-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.processor-link:hover {
    color: var(--white);
}

.processor-link svg {
    width: 12px;
    height: 12px;
}

/* Confidence Badge */
.confidence-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
}

.confidence-high {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
}

.confidence-medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.confidence-low {
    background: rgba(156, 163, 175, 0.15);
    color: var(--gray-400);
}

/* No Results / Error */
.no-results, .error-box {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
}

.no-results svg, .error-box svg {
    width: 72px;
    height: 72px;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.error-box svg {
    color: var(--danger);
}

.no-results h2, .error-box h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.no-results p, .error-box p {
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

.no-results ul {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
    padding-left: 1.5rem;
    color: var(--gray-400);
    font-size: 0.9375rem;
}

.no-results ul li {
    margin-bottom: 0.5rem;
}

.try-again-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    text-decoration: none;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
}

.try-again-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Search Again */
.search-again {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 2rem;
}

.search-again h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Ad Containers */
.ad-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    min-height: 90px;
}

.ad-header {
    margin-bottom: 1.5rem;
}

.ad-footer {
    margin-top: 1.5rem;
}

.ad-sidebar {
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem 0;
    margin-top: auto;
}

.footer p {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Loading State */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive */
@media (max-width: 640px) {
    .hero {
        padding: 2rem 0 3rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .search-input-wrapper {
        flex-direction: column;
    }

    .search-input {
        text-align: center;
    }

    .search-button {
        width: 100%;
        justify-content: center;
    }

    .trust-badges {
        gap: 1rem;
    }

    .trust-badge {
        font-size: 0.75rem;
    }

    .results-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .processors-list {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-900);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--white);
}

/* PWA Install Banner */
.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    justify-content: center;
    padding: 1rem;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    width: 100%;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-xl);
    padding: 1rem 1.25rem;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3), 0 0 40px var(--primary-glow);
}

.install-banner-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.install-banner-icon svg {
    width: 22px;
    height: 22px;
    color: var(--white);
}

.install-banner-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.install-banner-text strong {
    color: var(--white);
    font-size: 0.9375rem;
}

.install-banner-text span {
    color: var(--gray-400);
    font-size: 0.8125rem;
}

.install-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.install-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.install-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.install-dismiss {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.install-dismiss:hover {
    color: var(--white);
}

@media (max-width: 640px) {
    .install-banner-text span {
        display: none;
    }
}

/* Base64 Conversion Tabs */
.conversion-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease 0.25s both;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--gray-200);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: var(--white);
}

/* Conversion Form */
.conversion-form {
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease 0.3s both;
    display: none;
}

.conversion-form.active {
    display: block;
}

.conversion-form-inline {
    max-width: 700px;
    margin: 0 auto;
}

.textarea-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.textarea-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    background: rgba(255, 255, 255, 0.08);
}

.conversion-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 1rem 1.25rem;
    background: transparent;
    color: var(--white);
    resize: vertical;
    min-height: 120px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.6;
}

.conversion-input::placeholder {
    color: var(--gray-500);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.convert-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.convert-button:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.convert-button:active {
    transform: translateY(0);
}

.convert-button svg {
    width: 20px;
    height: 20px;
}

/* Recent Operation Badge */
.recent-operation-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.recent-operation-badge.encode {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
}

.recent-operation-badge.decode {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
}

/* Result Section */
.result-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    overflow: hidden;
    animation: fadeInUp 0.4s ease 0.2s both;
}

.result-box.output {
    border-color: rgba(16, 185, 129, 0.3);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.result-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-300);
    margin: 0;
}

.result-header h2 svg {
    width: 18px;
    height: 18px;
    color: var(--gray-500);
}

.result-box.output .result-header h2 svg {
    color: var(--success);
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success-light);
}

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

.result-content {
    padding: 1.5rem;
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--gray-200);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
}

.result-arrow {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
}

.result-arrow svg {
    width: 24px;
    height: 24px;
    color: var(--primary-light);
}

/* API Code Block */
.sidebar-section code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: var(--primary-light);
}
