:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #7c3aed;
    --accent: #8b5cf6;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-light: #cbd5e1;
    --success: #059669;
    --error: #dc2626;
    --warning: #d97706;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 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 20px rgba(99, 102, 241, 0.3);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    z-index: 10000;
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10001;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
}

.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: flex-start;
    z-index: 10000;
}

.nav-links.active {
    right: 0;
}

.nav-link {
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    width: 100%;
    display: block;
    position: relative;
}

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

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

.nav-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white !important;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    margin-top: 1rem;
    width: 100%;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

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

/* Desktop Navigation */
@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
    
    .nav-links {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        display: flex;
        align-items: center;
        gap: 2rem;
    }
    
    .nav-link {
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text-muted);
        padding: 0;
        width: auto;
    }
    
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        transition: width 0.3s ease;
    }
    
    .nav-link:hover::after {
        width: 100%;
    }
    
    .nav-link.active::after {
        width: 100%;
    }
    
    .nav-cta {
        margin-top: 0;
        padding: 0.75rem 1.75rem;
        width: auto;
    }
}

/* Hero Section */
.hero-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 1rem 3rem;
    text-align: center;
    position: relative;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 10rem 2rem 4rem;
    }
}

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

.hero-badge svg {
    fill: currentColor;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease 0.2s both;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease 0.4s both;
    font-weight: 400;
}

/* Upload Area Styling */
.upload-wrapper {
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* Tabs */
.upload-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

@media (min-width: 640px) {
    .upload-tabs {
        gap: 1rem;
        border-radius: 50px;
        flex-wrap: nowrap;
    }
}

.tab-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 120px;
    text-align: center;
}

@media (min-width: 640px) {
    .tab-btn {
        border-radius: 50px;
        padding: 0.75rem 1.5rem;
        flex: 0 1 auto;
    }
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Drop Zone */
.drop-zone {
    background: white;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .drop-zone {
        padding: 3rem;
        border-radius: 24px;
    }
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.2);
}

.drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.02);
}

.drop-zone-content {
    pointer-events: none;
    text-align: center;
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.drop-zone:hover .upload-icon {
    color: var(--primary);
}

.drop-text {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.drop-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Bulk Info */
.bulk-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}

@media (min-width: 768px) {
    .bulk-info {
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        font-size: 1rem;
        align-items: center;
    }
}

.bulk-info svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

@media (min-width: 768px) {
    .bulk-info svg {
        margin-top: 0;
    }
}

/* Preview Grid */
.bulk-preview {
    margin-top: 1.5rem;
}

.bulk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

#bulk-count {
    font-weight: 600;
    color: var(--text-primary);
}

.clear-btn {
    background: none;
    border: none;
    color: var(--error);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.clear-btn:hover {
    background: rgba(220, 38, 38, 0.1);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f8fafc;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.preview-item:hover .preview-remove {
    opacity: 1;
}

/* AI START: Progress Bar Styles */
.progress-bar-container {
    background: white;
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--border);
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

#bulk-progress-text {
    font-weight: 600;
    color: var(--primary);
}

.progress-bar-label {
    color: var(--text-muted);
}
/* AI END */

/* Process Button */
.process-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

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

.process-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Processing Overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

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

#processing-text {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Result Section */
.result-section {
    max-width: 1000px;
    margin: 3rem auto 0;
    animation: fadeInUp 0.8s ease;
}

@media (min-width: 768px) {
    .result-section {
        margin: 4rem auto 0;
    }
}

.result-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .result-container {
        border-radius: 24px;
        padding: 3rem;
    }
}

.result-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.success-icon {
    color: var(--success);
}

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

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

.comparison-item {
    text-align: center;
}

.comparison-label {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.comparison-item img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: repeating-conic-gradient(#f1f5f9 0% 25%, white 0% 50%) 50% / 20px 20px;
}

.download-wrapper {
    text-align: center;
}

/* Download Buttons */
.download-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white !important;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    margin: 0.5rem 0;
    font-family: inherit;
}

@media (min-width: 768px) {
    .download-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.download-btn-secondary {
    background: white;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.download-btn-secondary:hover {
    background: rgba(99, 102, 241, 0.05);
}

.download-btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 50px;
}

/* Bulk Results */
.bulk-results {
    margin-top: 2rem;
}

.bulk-actions {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 640px) {
    .bulk-actions {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 1.5rem 2rem;
    }
}

.bulk-actions-info h3 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.bulk-actions-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.bulk-actions-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

.result-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.result-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: repeating-conic-gradient(#f1f5f9 0% 25%, white 0% 50%) 50% / 20px 20px;
}

@media (min-width: 768px) {
    .result-card img {
        height: 160px;
    }
}

.result-card-info {
    padding: 0.75rem;
    text-align: center;
}

.result-card-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .result-card-name {
        font-size: 0.875rem;
    }
}

.success-badge, .error-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.success-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.error-badge {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

@media (min-width: 768px) {
    .success-badge, .error-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }
}

/* Stats Section */
.stats-section {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    text-align: center;
    animation: fadeInUp 1s ease;
}

@media (min-width: 640px) {
    .stats-section {
        grid-template-columns: repeat(4, 1fr);
        padding: 2.5rem;
        margin: 4rem auto;
    }
}

.stat-item {
    padding: 0.5rem;
}

.stat-number {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Features Section */
.features-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .features-section {
        margin: 6rem auto;
        padding: 0 2rem;
    }
}

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

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 4rem;
    }
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

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

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

.feature-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .feature-card {
        padding: 2.5rem;
        border-radius: 24px;
    }
}

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

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .feature-icon {
        width: 60px;
        height: 60px;
        border-radius: var(--radius-lg);
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    transform: scale(1.05);
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .feature-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
}

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Testimonials Section */
.testimonials-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .testimonials-section {
        margin: 6rem auto;
        padding: 0 2rem;
    }
}

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

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

.testimonial-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    position: relative;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .testimonial-card {
        padding: 2.5rem;
        border-radius: 24px;
    }
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

.quote-icon {
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 0.75rem;
    font-family: Georgia, serif;
    line-height: 1;
}

@media (min-width: 768px) {
    .quote-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
}

.testimonial-text {
    color: #334155;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .author-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

.author-info h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    font-size: 0.95rem;
}

.author-info p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.875rem;
}

.stars {
    color: #fbbf24;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .faq-section {
        margin: 6rem auto;
        padding: 0 2rem;
    }
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .faq-item {
        border-radius: var(--radius-lg);
    }
}

.faq-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.05);
}

.faq-item[open] {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.1);
}

.faq-question {
    padding: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    transition: color 0.3s ease;
    font-size: 1rem;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

@media (min-width: 768px) {
    .faq-question {
        padding: 1.5rem;
    }
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    animation: fadeIn 0.3s ease;
}

@media (min-width: 768px) {
    .faq-answer {
        padding: 0 1.5rem 1.5rem;
    }
}

/* CTA Section */
.cta-section {
    max-width: 1200px;
    margin: 4rem auto 0;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .cta-section {
        margin: 6rem auto 0;
        padding: 0 2rem;
    }
}

.cta-container {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: var(--radius-xl);
    padding: 3rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .cta-container {
        border-radius: 32px;
        padding: 4rem;
    }
}

.cta-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-subtitle {
    color: #a5b4fc;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-button {
    background: white;
    color: var(--primary);
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: #f8fafc;
}

/* Footer */
.main-footer {
    background: #020617;
    color: white;
    padding: 3rem 1rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
    .main-footer {
        padding: 4rem 2rem 2rem;
        margin-top: 6rem;
    }
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: 1.5fr repeat(2, 1fr);
        gap: 3rem;
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1.5fr repeat(3, 1fr);
        gap: 4rem;
    }
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

@media (min-width: 768px) {
    .footer-logo {
        margin-bottom: 1.5rem;
    }
}

.footer-logo span {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-desc {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    .social-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    transform: translateY(-3px);
    border-color: transparent;
}

.footer-column h4 {
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.625rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}

.footer-copyright {
    color: #64748b;
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 640px) {
    .footer-legal {
        justify-content: flex-end;
    }
}

.footer-legal a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: white;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* AI START: Authentication Styles */
.auth-page {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    min-height: 100vh;
}

.auth-container {
    max-width: 480px;
    margin: 8rem auto 4rem;
    padding: 0 1.5rem;
}

.auth-box {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.error-message {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* AI START: Professional Dashboard Styles */
.dashboard-body {
    background: #f1f5f9;
    min-height: 100vh;
}

.dashboard-main {
    padding-top: 80px;
    padding-bottom: 4rem;
}

.dashboard-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 3rem 1.5rem;
    margin-bottom: 2rem;
    color: white;
}

.dashboard-hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-title span {
    font-weight: 400;
    opacity: 0.9;
}

.dashboard-subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}

@media (min-width: 640px) {
    .card-header {
        align-items: center;
        flex-wrap: nowrap;
    }
}

.card-title-section {
    flex: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-with-icon svg {
    width: 18px;
    height: 18px;
}

/* API Keys Table */
.api-keys-table-container {
    overflow-x: auto;
}

.api-keys-table {
    width: 100%;
    border-collapse: collapse;
}

.api-keys-table th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.api-keys-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.api-keys-table tr:last-child td {
    border-bottom: none;
}

.api-keys-table tr:hover {
    background: #f8fafc;
}

.loading-row td,
.error-cell {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.revoked-row {
    opacity: 0.6;
}

.key-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.key-masked {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-primary);
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

.key-elsewhere {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: help;
    color: var(--text-muted);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-icon:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.btn-revoke:hover {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error);
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-pro {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary);
}

.tier-free {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-active::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

.status-revoked {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

/* Empty State */
.empty-state-container {
    text-align: center;
    padding: 3rem;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* Code Section */
.code-section {
    padding: 1.5rem;
}

.code-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.code-label:first-child {
    margin-top: 0;
}

.code-block {
    position: relative;
    background: #1e293b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.code-block code {
    color: #e2e8f0;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre;
}

.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #94a3b8;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-container {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* API Key Reveal */
.api-key-reveal {
    background: #f8fafc;
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-key-code {
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
    color: var(--text-primary);
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.btn-copy-lg {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    margin: 0 auto;
}

.btn-copy-lg:hover {
    background: var(--primary);
    color: white;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 10001;
    animation: toastSlideUp 0.3s ease;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Form Elements */
.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

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

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

/* ======================== */
/* API Key Display Card     */
/* ======================== */

.api-key-display-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.api-key-box {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.api-key-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.api-key-value-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.api-key-value {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
  word-break: break-all;
  flex: 1;
  background: white;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.btn-copy-key {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-copy-key:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.usage-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.usage-stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.875rem;
  text-align: center;
}

.usage-stat-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.usage-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.usage-bar-container {
  padding-top: 0.25rem;
}

.usage-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.usage-bar {
  background: var(--border);
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* AI END */