:root {
    --primary: #FF6B6B;
    --primary-hover: #FF5252;
    --bg-color: #F0F2F5;
    --text-color: #2D3436;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --input-bg: #FFFFFF;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.app-container {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-color);
}

.admin-link {
    text-decoration: none;
    color: #636e72;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.admin-link:hover {
    color: var(--primary);
}

.counter-cardglass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    margin-bottom: 2rem;
    /* Added spacing */
}

.counter-cardglass:hover {
    transform: translateY(-5px);
}

#counter-display {
    font-size: 6rem;
    /* Increased size */
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    text-shadow: 2px 4px 10px rgba(255, 107, 107, 0.2);
}

.label {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    color: #636e72;
    font-weight: 500;
}

.controls-container {
    background: white;
    /* Clean white bg for form */
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.5rem;
    color: #4b5563;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

input {
    padding: 1.2rem;
    border-radius: 16px;
    border: 2px solid #edf2f7;
    background: #f8fafc;
    font-family: inherit;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    color: var(--text-color);
}

input:hover {
    background: #fff;
    border-color: #cbd5e1;
}

input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15);
    transform: translateY(-1px);
}

.primary-btn {
    position: relative;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    border: none;
    padding: 1.4rem;
    border-radius: 18px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.4);
}

.primary-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 10px rgba(255, 107, 107, 0.2);
}

.chart-container {
    height: 300px;
}

.primary-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.error-toast {
    color: #e74c3c;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.2rem;
}

.hidden {
    opacity: 0;
    visibility: hidden;
}

.timer {
    text-align: center;
    color: #636e72;
    font-weight: 500;
}

/* Animations */
@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.pop-anim {
    animation: pop 0.15s ease-out;
}