@import url('https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #2d3436, #000000);
    padding: 20px;
    color: #f4f4f4;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

h1 {
    font-size: 48px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.2);
    color: #00b894;
}

button {
    background-color: #00b894;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    margin: 10px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    font-size: 18px;
    font-weight: bold;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

#task {
    font-size: 24px;
    color: #fff;
    text-align: center;
    margin-top: 40px;
}

#current-task {
    font-size: 36px;
    color: #fff;
    text-align: center;
    margin-top: 20px;
}

#timer {
    font-size: 24px;
    color: #fff;
    text-align: center;
    margin-top: 20px;
}

.code {
    font-size: 24px;
    color: #fdcb6e;
    text-align: center;
    margin-top: 20px;
}

#scrollableDiv {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 40px;
    width: 80%;
    max-width: 600px;
}

#scrollableDiv div {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 18px;
    color: #fff;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

#scrollableDiv div:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 36px;
    }

    #task, #current-task, #timer, .code {
        font-size: 20px;
    }
}

/* Всплывающее окно */
.popup {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.popup .popup-content {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    margin: auto;
    background-color: #f0f8ff;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: popupFadeIn 0.3s ease-in-out;
}

.popup .popup-rules-content {
    padding: 10px;
}

.popup h2 {
    color: #4ecdc4;
    font-size: 10vw;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: textZoomIn 0.5s ease-in-out;
}

#rules-text {
    font-size: 16px;
    color: #000;
    max-height: calc(100% - 40px);
    overflow-y: auto;
    margin: 0;
}

@media (min-width: 768px) {
    #rules-text {
        font-size: 2vw;
    }
}

@keyframes popupFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

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

@keyframes textZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

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