/* ==========================================
   FAUCET SCRIPT - MAIN STYLESHEET
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6c63ff;
    --primary-dark: #5a52d5;
    --secondary: #ff6584;
    --accent: #43e97b;
    --accent2: #f7971e;
    --bg-dark: #0f0e17;
    --bg-card: #1a1928;
    --bg-card2: #222136;
    --text-main: #fffffe;
    --text-muted: #a7a9be;
    --border: rgba(108,99,255,0.18);
    --shadow: 0 8px 40px rgba(108,99,255,0.18);
    --radius: 18px;
    --radius-sm: 10px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(108,99,255,0.13) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(67,233,123,0.08) 0%, transparent 60%);
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    width: 100%;
    padding: 18px 40px;
    background: rgba(26,25,40,0.95);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar .logo span {
    color: var(--primary);
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar .nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar .nav-links a:hover {
    color: var(--primary);
}

.btn-logout {
    background: rgba(255,101,132,0.12);
    color: var(--secondary) !important;
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255,101,132,0.25);
    transition: all 0.2s !important;
}

.btn-logout:hover {
    background: rgba(255,101,132,0.22) !important;
    color: #fff !important;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */
.main-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
}

/* ==========================================
   CARD
   ========================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 44px;
    width: 100%;
    max-width: 480px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(108,99,255,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.card::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(67,233,123,0.10) 0%, transparent 70%);
    pointer-events: none;
}

.card-logo {
    font-size: 3.5rem;
    margin-bottom: 10px;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(108,99,255,0.4));
}

.card-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.card-title span {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    line-height: 1.6;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-card2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

.form-group input::placeholder {
    color: rgba(167,169,190,0.5);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 20px rgba(108,99,255,0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108,99,255,0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent), #00c9ff);
    color: #0f0e17;
    box-shadow: 0 4px 20px rgba(67,233,123,0.30);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(67,233,123,0.45);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent2), #ffd200);
    color: #0f0e17;
    box-shadow: 0 4px 20px rgba(247,151,30,0.30);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(247,151,30,0.45);
}

.btn:disabled, .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================
   ALERTS / MESSAGES
   ========================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(67,233,123,0.12);
    border: 1px solid rgba(67,233,123,0.3);
    color: var(--accent);
}

.alert-error {
    background: rgba(255,101,132,0.12);
    border: 1px solid rgba(255,101,132,0.3);
    color: var(--secondary);
}

.alert-info {
    background: rgba(108,99,255,0.12);
    border: 1px solid rgba(108,99,255,0.3);
    color: #a78bfa;
}

.alert-warning {
    background: rgba(247,151,30,0.12);
    border: 1px solid rgba(247,151,30,0.3);
    color: var(--accent2);
}

/* ==========================================
   FAUCET PAGE - STATS CARDS
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px 12px;
    text-align: center;
}

.stat-card .stat-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
    display: block;
}

.stat-card .stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    display: block;
}

.stat-card .stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

.stat-card.highlight .stat-value {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   CLAIM TIMER BAR
   ========================================== */
.claim-section {
    margin-top: 10px;
}

.timer-display {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 22px;
    margin-bottom: 20px;
}

.timer-display .timer-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.timer-display .timer-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--secondary);
    font-variant-numeric: tabular-nums;
}

.progress-bar-wrap {
    background: rgba(255,255,255,0.07);
    border-radius: 30px;
    height: 8px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 30px;
    transition: width 1s linear;
}

.reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(67,233,123,0.12);
    border: 1px solid rgba(67,233,123,0.25);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 30px;
    margin-bottom: 22px;
}

.daily-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

/* ==========================================
   LINK PAGE - TIMER
   ========================================== */
.link-timer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 52px 44px;
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.big-timer {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin: 20px 0;
    font-variant-numeric: tabular-nums;
}

.timer-ring {
    width: 160px;
    height: 160px;
    margin: 0 auto 20px;
    position: relative;
}

.timer-ring svg {
    transform: rotate(-90deg);
}

.timer-ring .ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.07);
    stroke-width: 10;
}

.timer-ring .ring-progress {
    fill: none;
    stroke: url(#ringGrad);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.timer-ring .ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--text-main);
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.step.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 14px rgba(108,99,255,0.5);
}

.step.done {
    background: var(--accent);
    border-color: var(--accent);
    color: #0f0e17;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    max-width: 50px;
}

/* ==========================================
   SUCCESS PAGE
   ========================================== */
.success-icon {
    font-size: 4rem;
    display: block;
    margin: 0 auto 20px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.confetti-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 14px;
    top: -20px;
    opacity: 0;
    animation: confettiFall 3s ease-in forwards;
}

@keyframes confettiFall {
    0% { top: -20px; opacity: 1; transform: rotate(0deg); }
    100% { top: 110vh; opacity: 0; transform: rotate(720deg); }
}

/* ==========================================
   DIVIDER
   ========================================== */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ==========================================
   USER INFO BAR
   ========================================== */
.user-bar {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    font-size: 0.88rem;
}

.user-bar .user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
}

.user-bar .user-email {
    color: var(--text-main);
    font-weight: 600;
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: auto;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ==========================================
   LOADING SPINNER
   ========================================== */
.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 520px) {
    .card, .link-timer-card {
        padding: 32px 22px;
        border-radius: 14px;
    }

    .card-title {
        font-size: 1.6rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-card {
        padding: 12px 6px;
    }

    .stat-card .stat-value {
        font-size: 1rem;
    }

    .navbar {
        padding: 14px 20px;
    }

    .big-timer {
        font-size: 4rem;
    }
}

/* ==========================================
   GLOW EFFECTS
   ========================================== */
.glow-primary { box-shadow: 0 0 20px rgba(108,99,255,0.4); }
.glow-success { box-shadow: 0 0 20px rgba(67,233,123,0.4); }
.glow-warning { box-shadow: 0 0 20px rgba(247,151,30,0.4); }

/* ==========================================
   PULSE ANIMATION
   ========================================== */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ==========================================
   FADE IN
   ========================================== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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