* {
    box-sizing: border-box;
    font-family: 'Poppins', Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: #181826;
    color: #ffffff;
}

.app-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 8vh;
    background-color: #2a2a3c;
    display: flex;
    align-items: center;
    padding: 10px;
    z-index: 10;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.app-bar .logo {
    width: 40px;
    height: 40px;
    margin-left: 15px;
}

.app-bar .title {
    font-size: 24px;
    font-family: 'Crackman', serif;
    flex: 1;
    text-align: center;
    margin-right: 80px;
    color: #AF69EE;
}

.app-bar .refresh-btn {
    position: absolute;
    right: 60px;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
}

.app-bar .menu-btn {
    position: absolute;
    right: 20px;
    color: #ffffff;
    font-size: 18px;
}

.content {
    margin: 8vh 0 10vh 0;
    background-color: #1e1e2e;
    border-radius: 45px 45px 0 0;
    padding: 20px;
    min-height: calc(75vh);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10vh;
    background-color: #2a2a3c;
    border-radius: 30px 30px 0 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 10px;
}

.nav-item {
    text-align: center;
    color: #ccc;
    flex: 1;
}

.nav-item.active {
    color: #AF69EE;
}

.nav-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
    font-family: 'Material Icons';
}

.form-container {
    max-width: 400px;
    margin: 0 auto;
}

input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background-color: #2a2a3c;
    border: 1px solid #444;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
}

#tab-freerooms input[type="date"],
#tab-freerooms input[type="time"] {
    text-align: center;
}

@media screen and (max-width: 480px) {
    #tab-freerooms input[type="date"],
    #tab-freerooms input[type="time"] {
        width: 90%;
        float: center;
        margin: 10px 0;
    }

    input[type="date"], input[type="time"] {
        width: 90%;
        float: center;
        margin-right: 4%;
    }

    input[type="time"] {
        float: center;
        margin-right: 0;
    }

    .form-container::after {
        content: "";
        display: table;
        clear: both;
    }
}

input:focus {
    outline: none;
    border-color: #AF69EE;
}

button {
    width: 100%;
    padding: 15px;
    background-color: #AF69EE;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    margin: 10px 0;
    cursor: pointer;
}

button:hover {
    background-color: #9a5ad6;
}

#language-select {
    width: 100%;
    padding: 15px;
    background-color: #AF69EE;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    margin: 10px 0;
    cursor: pointer;
}

#language-select:hover {
    background-color: #9a5ad6;
}

.class-list {
    display: none;
}

.class-item {
    background-color: #2a2a3c;
    margin: 10px 0;
    padding: 15px;
    border-radius: 25px;
    border: 1px solid #444;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 20;
}

.modal-content {
    background-color: #2a2a3c;
    margin: 20% auto;
    padding: 20px;
    width: 80%;
    border-radius: 20px;
    max-width: 400px;
}

/* Courses Button in App Bar */
.app-bar .courses-btn {
    position: absolute;
    right: 100px;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-bar .courses-btn .material-icons {
    font-size: 22px;
}

/* Courses Modal */
.courses-modal-content {
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    margin: 10% auto;
}

.courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.courses-header h2 {
    margin: 0;
    color: #AF69EE;
}

.courses-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: auto;
    padding: 8px;
    background-color: #3a3a4c;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: #4a4a5c;
}

.icon-btn .material-icons {
    font-size: 20px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.course-item {
    background-color: #3a3a4c;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.course-item:hover {
    border-color: #AF69EE;
}

.course-item.visible {
    background-color: #3a3a4c;
}

.course-item.hidden {
    background-color: rgba(58, 58, 76, 0.4);
}

.course-item.hidden .course-name,
.course-item.hidden .course-teacher {
    color: #888;
    text-decoration: line-through;
}

.course-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-name {
    font-weight: 600;
    font-size: 14px;
}

.course-teacher {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}

.course-icon {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.course-icon .material-icons {
    font-size: 18px;
    color: #AF69EE;
}

.course-item.hidden .course-icon .material-icons {
    color: #666;
}

@media screen and (max-width: 400px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
}
