@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

/* CSS Variables - Default Purple Theme */
:root {
    --bg-color: #2c2c3e;
    --text-color: #fefefe;
    --inactive-color: #3a3a47;
    --accent-color: #BB90E9;
    --dark-accent: #5F31A2;
    --circle-fill: linear-gradient(20deg, #773DB9, #5F31A2);
}

/* Neon/Cyberpunk Theme */
:root[data-theme="neon"] {
    --bg-color: #0a0a0f;
    --text-color: #ffffff;
    --inactive-color: #1a1a2e;
    --accent-color: #00ff88;
    --dark-accent: #00cc6a;
    --circle-fill: linear-gradient(135deg, #e6ff7a 0%, #a7ff60 100%);
}

/* Sunset Theme */
:root[data-theme="sunset"] {
    --bg-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color: #ffffff;
    --inactive-color: rgba(255, 255, 255, 0.3);
    --accent-color: #ff6b6b;
    --dark-accent: #ee5a52;
    --circle-fill: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

/* Ocean Theme */
:root[data-theme="ocean"] {
    --bg-color: linear-gradient(135deg, #667db6 0%, #0082c8 40%, #0082c8 60%, #667db6 100%);
    --text-color: #ffffff;
    --inactive-color: rgba(255, 255, 255, 0.4);
    --accent-color: #4ecdc4;
    --dark-accent: #44a08d;
    --circle-fill: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* Forest Theme */
:root[data-theme="forest"] {
    --bg-color: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
    --text-color: #ffffff;
    --inactive-color: rgba(255, 255, 255, 0.4);
    --accent-color: #7dd87d;
    --dark-accent: #5cb85c;
    --circle-fill: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
}

.theme-switcher {
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: var(--text-color);
    backdrop-filter: blur(5px);
}

.theme-switcher select {
    margin-left: 0.5rem;
    padding: 0.25rem;
    border-radius: 4px;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--dark-accent);
}

/* General Reset & Body */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
html {
    height: 100%;
    margin: 0;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    overflow: hidden;
}

h1 {
    font-size: 5rem;
    color: var(--text-color);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    animation: fadeInUp 1s ease forwards;
}

.content {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content p {
    color: var(--text-color);
    margin: 1rem;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

a {
    text-decoration: none;
    color: white;
    border: 2px solid var(--accent-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

a:hover {
    background-color: var(--dark-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(187, 144, 233, 0.3);
}

footer {
    position: fixed;
    bottom: 1rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-color);
}

footer a {
    border: none;
    padding: 0;
    color: var(--text-color);
}

footer a:hover {
    background: none;
}

footer.delayed-fade {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 2.5s;
}

.controls {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    position: absolute;
    left: 1rem;
    top: 1rem;
    display: flex;
    flex-direction: column;
    width: 240px;
    font-family: Roboto, Helvetica, Arial, sans-serif;
}

.controls .counter {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 3rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.circle {
    border-radius: 100%;
    height: min(25vw, 25vh);
    width: min(25vw, 25vh);
    background: var(--circle-fill);
    border: 0.25rem solid var(--accent-color);
}

.circle.animated {
    animation-name: breath;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.step {
    padding: 12px;
    border-radius: 0.5rem;
    display: flex;
    font-size: 1rem;
}

.step .duration {
    height: 18px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    margin: 0 10px;
    width: 100px;
    flex-shrink: 0;
}

/* Unified Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}