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


canvas#bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}


body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #fff;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

h1 {
    font-size: clamp(32px, 6vw, 56px);
    margin-bottom: 40px;
    padding-bottom: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

div:has(select) {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

select {
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 120px;
    outline: none;
}

select:hover:not(:disabled) {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

select:focus {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

select option {
    background: #1a1a2e;
    color: #fff;
    padding: 10px;
}

.timer {
    margin: 50px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.timer:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.timer:first-of-type {
    margin-top: 0;
}

.timer > div:first-child {
    font-size: 18px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.big {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.3;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.timer:nth-of-type(2) .big {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Планшеты */
@media (max-width: 768px) {
    h1 {
        margin-bottom: 30px;
        padding-bottom: 14px;
    }

    div:has(select) {
        gap: 12px;
        margin-bottom: 40px;
    }

    select {
        padding: 12px 18px;
        font-size: 16px;
        min-width: 100px;
    }

    .timer {
        padding: 25px 20px;
        margin: 35px 0;
    }

    .timer > div:first-child {
        font-size: 17px;
    }

    .big {
        font-size: clamp(30px, 6vw, 44px);
    }
}

/* Мобильные */
@media (max-width: 480px) {
    body {
        justify-content: flex-start;
        padding-top: 60px;
        padding: 20px 15px;
    }

    h1 {
        margin-bottom: 28px;
        padding-bottom: 14px;
        font-size: clamp(30px, 8vw, 40px);
    }

    div:has(select) {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 35px;
        width: 100%;
        max-width: 100%;
    }

    select {
        width: 100%;
        padding: 14px;
        font-size: 17px;
    }

    .timer {
        padding: 22px 18px;
        margin: 20px 0;
        max-width: 100%;
        border-radius: 24px;
    }

    .timer > div:first-child {
        font-size: 17px;
        margin-bottom: 12px;
    }

    .big {
        font-size: clamp(34px, 9vw, 46px);
        margin-top: 8px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 320px) {
    h1 {
        font-size: 26px;
        padding-bottom: 12px;
    }

    select {
        padding: 13px;
        font-size: 15px;
    }

    .timer {
        padding: 18px 14px;
    }

    .timer > div:first-child {
        font-size: 15px;
    }

    .big {
        font-size: 22px;
    }
}
