/* ==========================================================================
   CSS Design Tokens & Modern Theme
   ========================================================================== */
:root {
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;

    /* Palette */
    --bg-dark: #080a0f;
    --bg-surface: rgba(18, 22, 33, 0.7);
    --bg-surface-hover: rgba(26, 32, 48, 0.85);
    --bg-input: rgba(12, 15, 24, 0.8);
    
    /* Accents & Gradients */
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    
    --grad-primary: linear-gradient(135deg, #60a5fa 0%, #c084fc 50%, #f472b6 100%);
    --grad-button: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --grad-button-hover: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --grad-glow-1: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, rgba(99, 102, 241, 0) 70%);
    --grad-glow-2: radial-gradient(circle, rgba(168, 85, 247, 0.22) 0%, rgba(168, 85, 247, 0) 70%);
    --grad-glow-3: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, rgba(6, 182, 212, 0) 70%);

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;

    /* Borders & Glass */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --border-focus: rgba(99, 102, 241, 0.6);
    --glass-blur: blur(20px);
    
    /* Shadows */
    --shadow-card: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.07);
    --shadow-glow: 0 0 35px -5px rgba(99, 102, 241, 0.35);
    
    /* Transitions */
    --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Resets */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    min-height: 100vh;
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Background & Ambient Lighting
   ========================================================================== */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.75;
    animation: floatOrb 20s infinite alternate ease-in-out;
}

.orb-1 {
    top: -15%;
    left: 15%;
    width: 600px;
    height: 600px;
    background: var(--grad-glow-1);
    animation-duration: 18s;
}

.orb-2 {
    bottom: -10%;
    right: 10%;
    width: 550px;
    height: 550px;
    background: var(--grad-glow-2);
    animation-duration: 22s;
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 45%;
    width: 450px;
    height: 450px;
    background: var(--grad-glow-3);
    animation-duration: 25s;
    animation-delay: -10s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, -40px) scale(1.1); }
    100% { transform: translate(-50px, 50px) scale(0.95); }
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 75%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 75%, transparent 100%);
}

.bg-particles {
    position: absolute;
    inset: 0;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 12s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    20% { opacity: 0.6; }
    80% { opacity: 0.6; }
    100% {
        transform: translateY(-120px) scale(1.2);
        opacity: 0;
    }
}

/* ==========================================================================
   Main Layout Container
   ========================================================================== */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 1.5rem;
}

.content-container {
    width: 100%;
    max-width: 840px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
}

/* ==========================================================================
   Brand Header & Status Badge
   ========================================================================== */
.brand-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.1));
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-indigo);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.brand-logo:hover .logo-icon {
    transform: rotate(6deg) scale(1.05);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-glow);
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-accent {
    color: var(--accent-indigo);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    font-size: 0.825rem;
    font-weight: 500;
    color: #6ee7b7;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.5);
    animation: pulseRing 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(0.9); opacity: 0; }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.15rem;
    max-width: 680px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 580px;
    line-height: 1.65;
}

/* ==========================================================================
   Timer Section & Cards
   ========================================================================== */
.timer-section {
    width: 100%;
}

.timer-card {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2.2rem 2.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.timer-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.12);
}

.timer-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.6rem, 2.5vw, 1.75rem);
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: clamp(65px, 15vw, 105px);
}

.time-value {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    background: linear-gradient(180deg, #ffffff 30%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.time-label {
    font-size: clamp(0.725rem, 1.8vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.5rem;
}

.time-separator {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    margin-top: -1.25rem;
    user-select: none;
    animation: blinkSeparator 2s infinite ease-in-out;
}

@keyframes blinkSeparator {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.2; }
}

/* Progress bar inside timer */
.progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.progress-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-percent {
    color: var(--accent-cyan);
    font-weight: 700;
    font-family: var(--font-heading);
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #a855f7);
    border-radius: 9999px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.6);
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shineProgress 2.5s infinite linear;
}

@keyframes shineProgress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==========================================================================
   Action / Notify Section
   ========================================================================== */
.action-section {
    width: 100%;
}

.action-card {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2.2rem 2.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.action-card:hover {
    border-color: var(--border-hover);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
    letter-spacing: -0.02em;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.notify-form {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 0.4rem 0.4rem 0.4rem 1.1rem;
    transition: var(--transition-fast);
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.input-group:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.input-icon {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    margin-right: 0.75rem;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 0;
}

.input-group input::placeholder {
    color: var(--text-dim);
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--grad-button);
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    white-space: nowrap;
}

.btn-submit:hover {
    background: var(--grad-button-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.btn-submit svg {
    transition: transform var(--transition-fast);
}

.btn-submit:hover svg {
    transform: translateX(3px);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-feedback {
    margin-top: 0.85rem;
    font-size: 0.875rem;
    min-height: 1.25rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.form-feedback.success {
    color: #34d399;
}

.form-feedback.error {
    color: #f87171;
}

/* ==========================================================================
   Footer & Contacts
   ========================================================================== */
.page-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-top: 0.5rem;
}

.contacts-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

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

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 0.55rem 1.15rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: var(--glass-blur);
    transition: var(--transition-fast);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.social-btn svg {
    flex-shrink: 0;
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translate(-50%, 100px);
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #f8fafc;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.25);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.toast-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-emerald);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 640px) {
    .page-wrapper {
        padding: 1.75rem 1rem;
    }

    .content-container {
        gap: 1.8rem;
    }

    .brand-header {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .timer-card, .action-card {
        padding: 1.5rem 1.25rem;
        border-radius: 18px;
    }

    .input-group {
        flex-direction: column;
        padding: 0.6rem;
        background: transparent;
        border: none;
        box-shadow: none;
        gap: 0.75rem;
    }

    .input-group input {
        width: 100%;
        background: var(--bg-input);
        border: 1px solid var(--border-subtle);
        border-radius: 12px;
        padding: 0.85rem 1rem 0.85rem 2.6rem;
    }

    .input-icon {
        position: absolute;
        left: 1.5rem;
        top: 1.35rem;
        z-index: 2;
    }

    .btn-submit {
        width: 100%;
        padding: 0.9rem;
    }

    .social-links {
        flex-direction: column;
        width: 100%;
    }

    .social-btn {
        justify-content: center;
        width: 100%;
    }
}
