:root {
    --primary: #4facfe;
    --secondary: #00f2fe;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225,39%,30%,0.5) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339,49%,30%,0.5) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    overflow-x: hidden;
}

/* Ad Containers */
.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.ad-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
    /* Optional pulse animation so users know something belongs here */
    animation: ad-pulse 2s infinite alternate;
}

@keyframes ad-pulse {
    from { background: rgba(255, 255, 255, 0.05); }
    to { background: rgba(255, 255, 255, 0.08); }
}

.top-ad .ad-placeholder, .bottom-ad .ad-placeholder {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
}

.center-ad .ad-placeholder {
    width: 100%;
    max-width: 300px;
    min-height: 250px;
}

/* Main Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Shine effect */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    animation: shine 6s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.logo-area h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.highlight {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.instruction {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Timer */
.timer-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.5rem 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    stroke-dasharray: 326.726; /* 2 * pi * radius (52) */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
    font-variant-numeric: tabular-nums;
}

/* Button */
.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.btn:not(.disabled) {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 20px -10px rgba(0, 242, 254, 0.5);
}

.btn:not(.disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -10px rgba(0, 242, 254, 0.7);
}

.btn:not(.disabled):active {
    transform: translateY(0);
}

.btn.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: not-allowed;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.loader-container {
    position: absolute;
    left: 20px;
    display: none;
}

.btn.disabled .loader-container {
    display: flex;
}

/* Loader for disabled state */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .top-ad .ad-placeholder, .bottom-ad .ad-placeholder {
        min-height: 50px; /* Adjust for mobile banner size */
    }
}
