:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.8);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-red: #f85149;
    --accent-red-hover: #da3633;
    --border-color: rgba(240, 246, 252, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    /* Remove mobile tap blue highlight */
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(248, 81, 73, 0.1) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(31, 111, 235, 0.1) 0, transparent 50%);
    color: var(--text-primary);
    overflow: hidden;
    overscroll-behavior-y: contain;
    /* Prevent pull-to-refresh */
    user-select: none;
    /* Disable text selection for app feel */
    -webkit-user-select: none;
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
}

.container {
    padding: clamp(32px, 8vw, 64px) clamp(24px, 5vw, 48px);
    width: 95%;
    max-width: 600px;
    min-height: clamp(500px, 80vh, 900px);
    text-align: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.header p {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.counter-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.counter-display {
    font-size: clamp(8rem, 35vw, 16rem);
    font-weight: 800;
    line-height: 0.9;
    margin: 20px 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.counter-label {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.zero {
    color: var(--text-primary);
    opacity: 0.3;
}

.positive {
    color: var(--accent-red);
    text-shadow: 0 0 20px rgba(248, 81, 73, 0.3);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 6vw, 32px);
    width: 100%;
}

.secondary-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.btn {
    padding: 16px 32px;
    font-size: clamp(1.125rem, 4vw, 1.5rem);
    font-weight: 700;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-appearance: none;
    appearance: none;
}

.btn-primary {
    background-color: var(--accent-red);
    color: white;
    width: 100%;
    min-height: clamp(72px, 15vw, 96px);
    box-shadow: 0 12px 30px rgba(248, 81, 73, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:active {
    transform: scale(0.96);
    background-color: var(--accent-red-hover);
    box-shadow: 0 6px 15px rgba(248, 81, 73, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    padding: 16px 24px;
    font-size: clamp(0.875rem, 3vw, 1.125rem);
    min-height: 56px;
    flex: 1;
    border-radius: 16px;
}

.btn-outline:active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-text {
    background: transparent;
    color: var(--text-secondary);
    padding: 16px;
    font-size: clamp(0.875rem, 3vw, 1.125rem);
    text-decoration: underline;
    opacity: 0.7;
    min-height: 56px;
    flex: 1;
}

.btn-text:active {
    opacity: 1;
    color: var(--text-primary);
}

@media (max-width: 400px) {
    .container {
        padding: 32px 20px;
    }

    .secondary-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn-outline,
    .btn-text {
        width: 100%;
    }
}