:root {
    --bg-color: #f8fafc;
    /* Very light blue/grey background */
    --surface-color: #ffffff;
    /* Pure white card background */
    --accent-color: #2563eb;
    /* Vibrant blue */
    --accent-light: #60a5fa;
    /* Lighter blue for gradients/hover */
    --text-primary: #1e293b;
    /* Deep slate blue for primary text */
    --text-secondary: #64748b;
    /* Lighter slate for secondary text */
    --border-color: #e2e8f0;
    /* Soft border */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    /* Soft, airy gradient background */
    background: radial-gradient(circle at top right, #dbeafe, transparent 40%),
        radial-gradient(circle at bottom left, #e0e7ff, transparent 40%),
        var(--bg-color);
}

.container {
    padding: 2rem;
    width: 100%;
    max-width: 480px;
}

.glass-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

/* Subtle top highlight for the card to give it depth */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-light), var(--accent-color));
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.loader-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 2.5rem;
}

.loader {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid #eff6ff;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}

.loader-inner {
    position: absolute;
    top: 20%;
    left: 20%;
    width: 60%;
    height: 60%;
    border: 3px solid #eff6ff;
    border-bottom-color: var(--accent-light);
    border-radius: 50%;
    animation: spin-reverse 1.5s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}

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

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

h1 {
    font-weight: 600;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2.5rem;
}

.status-bar {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-light), var(--accent-color));
    border-radius: 999px;
    transition: width 0.1s linear;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-text a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
    text-decoration: underline;
    text-decoration-color: transparent;
}

.footer-text a:hover {
    color: #1d4ed8;
    text-decoration-color: #1d4ed8;
}

/* Troubleshooting section styles adapted for light theme */
.troubleshooting-trigger {
    margin-top: 1.5rem;
    position: relative;
    display: inline-block;
    cursor: help;
}

.troubleshooting-trigger>span {
    font-size: 0.8rem;
    color: #94a3b8;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 2px;
    transition: all 0.2s;
}

.troubleshooting-trigger:hover>span {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.troubleshooting-card {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 320px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

/* Add a pointer arrow to the tooltip */
.troubleshooting-card::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.troubleshooting-trigger:hover .troubleshooting-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.troubleshooting-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: #ef4444;
    /* Clean red for error highlight */
    display: flex;
    align-items: center;
    font-weight: 600;
}

.troubleshooting-card h3::before {
    content: "⚠️";
    margin-right: 8px;
    font-size: 1rem;
}

.troubleshooting-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.troubleshooting-card ul {
    list-style: none;
    padding: 0;
}

.troubleshooting-card li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.4;
}

.troubleshooting-card li::before {
    content: "•";
    color: var(--accent-light);
    position: absolute;
    left: 0;
    font-size: 1.2em;
    line-height: 1;
}

.troubleshooting-card li strong {
    color: var(--text-primary);
    font-weight: 600;
}