
:root {
    /* Light theme variables */
    --primary-color: #4285F4;
    --primary-dark: #3367d6;
    --primary-light: #669df6;
    --secondary-color: #34A853;
    --secondary-dark: #2d9348;
    --accent-color: #FBBC05;
    --accent-dark: #f0ad00;
    --danger-color: #EA4335;
    --danger-dark: #d73125;

    /* Surface colors */
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --surface-elevated: #ffffff;
    --surface-secondary: #f1f5f9;
    --surface-tertiary: #e2e8f0;

    /* Text colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* Border and shadow */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --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 10px 10px -5px rgb(0 0 0 / 0.1);

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --gradient-google: linear-gradient(135deg, #4285F4 0%, #34A853 25%, #FBBC05 50%, #EA4335 100%);
    --gradient-hero: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #2c5aa0 100%);
}

/* REALLY dark theme variables */
[data-theme="dark"] {
    --primary-color: #669df6;
    --primary-dark: #4285F4;
    --primary-light: #93c5fd;
    --secondary-color: #4AE66E;
    --secondary-dark: #34A853;
    --accent-color: #FFD54F;
    --accent-dark: #FBBC05;
    --danger-color: #FF6B6B;
    --danger-dark: #EA4335;

    /* Surface colors - REALLY dark */
    --background-color: #000000;
    --surface-color: #0a0a0a;
    --surface-elevated: #0f0f0f;
    --surface-secondary: #1a1a1a;
    --surface-tertiary: #262626;

    /* Text colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0a0a0a;

    /* Border and shadow */
    --border-color: #262626;
    --border-light: #1a1a1a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 10px 10px -5px rgb(0 0 0 / 0.3);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --gradient-google: linear-gradient(135deg, #669df6 0%, #4AE66E 25%, #FFD54F 50%, #FF6B6B 100%);
    --gradient-hero: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
}

/* System theme detection */
@media (prefers-color-scheme: dark) {
    [data-theme="system"] {
        --primary-color: #669df6;
        --primary-dark: #4285F4;
        --primary-light: #93c5fd;
        --secondary-color: #4AE66E;
        --secondary-dark: #34A853;
        --accent-color: #FFD54F;
        --accent-dark: #FBBC05;
        --danger-color: #FF6B6B;
        --danger-dark: #EA4335;

        --background-color: #000000;
        --surface-color: #0a0a0a;
        --surface-elevated: #0f0f0f;
        --surface-secondary: #1a1a1a;
        --surface-tertiary: #262626;

        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --text-inverse: #0a0a0a;

        --border-color: #262626;
        --border-light: #1a1a1a;
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
        --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 10px 10px -5px rgb(0 0 0 / 0.3);

        --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        --gradient-google: linear-gradient(135deg, #669df6 0%, #4AE66E 25%, #FFD54F 50%, #FF6B6B 100%);
        --gradient-hero: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    transition: all 0.3s ease;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
.header {
    background: var(--gradient-hero);
    color: var(--text-inverse);
    padding: 4rem 0;
    margin: -2rem -1.5rem 3rem;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.header .subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.header-right {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Selector */
.theme-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    gap: 0.25rem;
    backdrop-filter: blur(10px);
}

.theme-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-inverse);
}

/* Cards */
.card {
    background: var(--surface-color);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

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

.card-header {
    padding: 2rem 2rem 0;
}

.card-body {
    padding: 2rem;
}

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

.card-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Configuration Info */
.config-card {
    background: var(--gradient-google);
    color: var(--text-inverse);
    position: relative;
    overflow: hidden;
}

.config-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
}

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

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.config-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.config-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.config-value {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    background: var(--surface-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

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

[data-theme="dark"] .form-input:focus {
    box-shadow: 0 0 0 3px rgba(102, 157, 246, 0.1);
}

@media (prefers-color-scheme: dark) {
    [data-theme="system"] .form-input:focus {
        box-shadow: 0 0 0 3px rgba(102, 157, 246, 0.1);
    }
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-google {
    background: var(--gradient-google);
    color: var(--text-inverse);
    box-shadow: var(--shadow-md);
    margin: 2rem auto;
    display: flex;
}

.btn-google:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

/* Result Styles */
.result {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    transition: all 0.3s ease;
}

.result.error {
    border-color: var(--danger-color);
    background: rgba(234, 67, 53, 0.05);
}

.result.success {
    border-color: var(--secondary-color);
    background: rgba(52, 168, 83, 0.05);
}

.result.info {
    border-color: var(--primary-color);
    background: rgba(66, 133, 244, 0.05);
}

.result h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result.error h3 {
    color: var(--danger-color);
}

.result.success h3 {
    color: var(--secondary-color);
}

.result.info h3 {
    color: var(--primary-color);
}

/* Code blocks */
pre {
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 1rem 0;
}

/* Copy button */
.copy-btn {
    background: var(--surface-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
    border-color: var(--primary-color);
}

/* Step info */
.step-info {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.step-info h3 {
    color: var(--primary-color);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.75rem;
}

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

/* Countdown */
.countdown {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Instructions list */
.instructions-list {
    list-style: none;
    padding: 0;
}

.instructions-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--surface-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.instructions-list li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    background: var(--primary-color);
    color: var(--text-inverse);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.instructions-container {
    counter-reset: step-counter;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header {
        margin: -1rem -1rem 2rem;
        padding: 3rem 0;
    }

    .header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-right {
        position: static;
        justify-content: center;
        margin-top: 1rem;
    }

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

    .btn-google {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 2rem 0;
    }

    .card-header,
    .card-body {
        padding: 1.5rem;
    }

    .theme-selector {
        flex-direction: column;
        gap: 0.125rem;
    }
}