/* css/styles.css */

body {
    font-family: Arial, sans-serif;
    background-color: white;
    background-image: url('/images/bg.webp'); /* Переконайтесь, що bg.webp існує */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

a {
    text-decoration: none;
    color: red;
}

a:hover {
    color: white;
}

.login-container {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 400px;
    max-width: 90%;
    border: 2px solid red;
    position: relative;
}

.login-container h1.title_index {
    color: red;
    margin-bottom: 15px;
    font-size: 28px;
}

.form-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.toggle-button {
    padding: 10px 20px;
    background-color: transparent;
    border: 2px solid red;
    color: red;
    cursor: pointer;
    font-size: 16px;
    border-radius: 8px;
    margin: 0 5px;
    transition: background-color 0.3s, color 0.3s;
}

.toggle-button.active,
.toggle-button:hover {
    background-color: red;
    color: white;
}

.login-form,
.register-form {
    display: flex;
    flex-direction: column;
}

.login-form input,
.register-form input {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.login-form button,
.register-form button {
    padding: 12px 20px;
    background-color: red;
    border: none;
    color: white;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form button:hover,
.register-form button:hover {
    background-color: #d00000;
}

.login-form p,
.register-form p {
    font-size: 14px;
    color: #333;
}

.login-form p a,
.register-form p a {
    color: red;
    font-weight: bold;
}

.login-form p a:hover,
.register-form p a:hover {
    color: #d00000;
}

/* Сторінка Курсу */
.course-container {
    display: flex;
    margin: 0;
    padding: 20px;
    width: 100%;
    height: 100vh;
    gap: 20px;
    box-sizing: border-box;
    align-items: flex-start;
    position: relative;
}

.sidebar {
    width: 300px;
    background-color: red;
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 22px;
    border-bottom: 2px solid white;
    padding-bottom: 10px;
}

#topics-list {
    list-style-type: none;
    padding: 0;
    width: 100%;
}

#topics-list li {
    padding: 12px;
    background-color: white;
    color: red;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 10px;
    text-align: center;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 18px;
}

#topics-list li:hover {
    background-color: #d00000;
    color: white;
    transform: scale(1.05);
}

.content {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-left: 340px;
    width: calc(100% - 360px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
}

.content .tab-content {
    width: 100%;
    text-align: center;
    display: none;
    flex-direction: column;
    align-items: center;
}

#topic-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 30px;
    color: red;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
}

#topic-content {
    text-align: center;
    line-height: 1.8;
    margin-top: 20px;
    font-size: 18px;
}

#topic-content video,
#topic-content img {
    max-width: 80%;
    margin: 20px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.9);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: red;
    text-decoration: none;
    cursor: pointer;
}

.dz {
    color: red;
    font-size: 22px;
    font-weight: 600;
}

.text_dz {
    font-size: 20px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .course-container {
        flex-direction: column;
        align-items: center;
        padding: 10px;
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 10px;
        position: relative;
        box-shadow: none;
    }

    .sidebar h2 {
        font-size: 20px;
    }

    #topics-list li {
        font-size: 14px;
        padding: 8px;
        margin: 5px 0;
    }

    .content {
        width: 100%;
        margin: 0;
        padding: 20px;
        margin-left: 0;
        box-sizing: border-box;
    }

    .content .tab-content {
        width: 100%;
        padding: 10px;
    }

    .login-container {
        width: 90%;
        padding: 20px;
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
    }

    .final-test-form button,
    .login-form button,
    .register-form button {
        width: 100%;
    }
}

/* Styles for small phones (screen width up to 480px) */
@media (max-width: 480px) {
    .sidebar h2 {
        font-size: 18px;
    }

    #topics-list li {
        font-size: 12px;
        padding: 6px;
    }

    .content {
        padding: 10px;
    }

    .content .tab-content {
        padding: 5px;
    }

    .modal-content {
        width: 95%;
    }

    .login-container {
        width: 100%;
        padding: 15px;
    }
}
