* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

/* ==========================================================================
   CSS Variables (Default: Dark Mode)
   ========================================================================== */
:root {
    --bg-main: #0f172a;
    --card-bg: #1e293b;
    --card-border: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-color: #38bdf8;
    --accent-bg: rgba(14, 165, 233, 0.1);
    --accent-border: rgba(56, 189, 248, 0.2);
    
    --glow-bg: rgba(14, 165, 233, 0.15);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    
    --action-card-bg: #0f172a;
    --action-primary-bg: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(15, 23, 42, 0.4) 100%);
    --progress-bg: #1e293b;
}

/* ==========================================================================
   Automatic Light Mode Support (Sesuai OS / Preference User)
   ========================================================================== */
@media (prefers-color-scheme: light) {
    :root {
        --bg-main: #f8fafc;
        --card-bg: #ffffff;
        --card-border: #e2e8f0;
        --text-primary: #0f172a;
        --text-secondary: #475569;
        --text-muted: #64748b;
        
        --accent-color: #0284c7;
        --accent-bg: rgba(2, 132, 199, 0.08);
        --accent-border: rgba(2, 132, 199, 0.2);
        
        --glow-bg: rgba(14, 165, 233, 0.12);
        --card-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
        
        --action-card-bg: #f1f5f9;
        --action-primary-bg: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(241, 245, 249, 0.6) 100%);
        --progress-bg: #e2e8f0;
    }
}

/* ==========================================================================
   Base Layout
   ========================================================================== */
body {
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient background glow */
body::before {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(
        circle,
        var(--glow-bg) 0%,
        rgba(15, 23, 42, 0) 70%
    );
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

/* ==========================================================================
   Redirect Card & Badge
   ========================================================================== */
.redirect-card {
    position: relative;
    z-index: 1;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 36px 28px;
    max-width: 560px;
    width: 100%;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-bg);
    color: var(--accent-color);
    border: 1px solid var(--accent-border);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

.badge-status .pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(56, 189, 248, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

p.desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ==========================================================================
   Action Grid & Action Cards
   ========================================================================== */
.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 480px) {
    .action-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.action-card {
    background: var(--action-card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px 16px;
    text-align: left;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.action-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.15);
}

.action-card.primary {
    background: var(--action-primary-bg);
    border-color: var(--accent-border);
}

.action-card .card-icon {
    font-size: 20px;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.action-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.action-card .card-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   Timer & Progress Bar
   ========================================================================== */
.timer-box {
    background: var(--action-card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 16px;
    transition: background-color 0.3s ease;
}

.timer-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.timer-info strong {
    color: var(--accent-color);
}

.btn-cancel {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color 0.2s;
}

.btn-cancel:hover {
    color: #f43f5e;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--progress-bg);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 100%;
    background: var(--accent-color);
    border-radius: 10px;
    transition: width 0.1s linear;
}