/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Great+Vibes&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
    --bg-color: #0d1117;
    --primary-color: #58a6ff;
    --accent-color: #8b949e;
    --glass-bg: rgba(22, 27, 34, 0.7);
    --glass-border: rgba(240, 246, 252, 0.1);
    --text-color: #c9d1d9;
    --card-hover: rgba(56, 139, 253, 0.15);
    --flash-color: rgba(255, 80, 80, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.5s ease;
}

body.flashing {
    animation: screenFlash 1s infinite alternate;
}

@keyframes screenFlash {
    0% {
        background-color: var(--bg-color);
        box-shadow: inset 0 0 0 0 transparent;
    }

    100% {
        background-color: #2a0f0f;
        box-shadow: inset 0 0 50px 20px rgba(255, 0, 0, 0.2);
    }
}

/* Background Gradients */
.background-blob {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.15), transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    animation: blobFloat 10s infinite alternate;
}

.blob-1 {
    top: -100px;
    left: -100px;
}

.blob-2 {
    bottom: -100px;
    right: -100px;
    animation-delay: 5s;
    background: radial-gradient(circle, rgba(163, 113, 247, 0.15), transparent 70%);
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

/* Header */
header {
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #58a6ff, #a371f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    color: var(--accent-color);
    animation: fadeInUp 1s ease 0.3s backwards;
}

/* Circle Animation (Refined) */
.circle-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(88, 166, 255, 0.3);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 8s linear infinite;
}

.circle-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    border-color: rgba(163, 113, 247, 0.3);
    border-bottom: 2px solid #a371f7;
    animation: spin 12s linear infinite reverse;
}

.circle-content {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    color: var(--primary-color);
    z-index: 1;
}

/* Timer Section */
.timer-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.timer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.timer-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.timer-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.timer-card .target-label {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
}

.timer-display {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.5);
}

.timer-card.active-flash {
    animation: cardPulse 1s infinite alternate;
    border-color: #ff5050;
    box-shadow: 0 0 20px rgba(255, 80, 80, 0.3);
}

.timer-card.active-flash .timer-display {
    color: #ff5050;
    text-shadow: 0 0 10px rgba(255, 80, 80, 0.8);
}

@keyframes cardPulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

/* Features Grid */
.features {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(5px);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: rgba(22, 27, 34, 0.9);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    color: var(--accent-color);
}

/* Animations */
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .circle-container {
        width: 250px;
        height: 250px;
    }
}