/* General Reset */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    background-image: url('images/event.png'); /* Đảm bảo đường dẫn đúng */
    background-size: contain; /* Đảm bảo ảnh phủ toàn bộ màn hình */
    background-position: center; /* Căn giữa ảnh */
    overflow-x: hidden;
    background-attachment: fixed;
}

/* Navbar */
.navbar {
    width: 100%;
    background-color: rgb(255, 255, 255);
    color: black;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Navbar Logo */
.navbar-logo {
    display: flex;
    align-items: center; /* Vertically centers the logo and text */
    text-decoration: none;
}

.navbar-logo a {
    display: flex;
    align-items: center; /* Ensures logo and text are aligned horizontally */
    text-decoration: none;
    color: black; /* Set text color to black for visibility */
}

.navbar-logo img {
    height: 40px; /* Set the height of the logo */
    width: auto;
    margin-right: 10px; /* Space between logo and text */
}

.navbar-logo p {
    font-size: 20px;
    font-weight: bold;
    color: darkgreen;
    margin: 0;
    text-transform: uppercase;
}

.navbar-nav {
    display: flex;
    gap: 50px;
}

.nav-item a {
    color: darkblue;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-item a:hover {
    color: #f39c12;
}

/* Thanh tìm kiếm */
.search-bar {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 10px;
    padding: 0px 8px;
    border: solid 2px darkblue;
    margin: 0px;

}

.search-bar input {
    border: none;
    outline: none;
    background: #fff;
    color: darkblue;
    padding: 0px 10px;
    font-size: 20px;
    width: 195px;
}

.search-bar input::placeholder {
    color: black;
}

.search-bar button {
    border: none;
    background-color: white;
    color: darkblue;
    font-size: 20px;
    cursor: pointer;
    margin-top: 2px;
}

/* User menu */
.user-menu {
    color: darkblue;
    text-decoration: none;
    padding: 10px;
    font-size: 20px;
    font-weight: bold;
    position: relative;
    cursor: pointer;
    margin-right: 30px;
}

.user-menu:hover {
    color: #f39c12;
}

/* Dropdown menu */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 3px;
    background-color: #333;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.dropdown a {
    color: #fff;
    padding: 10px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown a:hover {
    background-color: #f39c12;
}

/* Hiển thị dropdown khi hover vào user menu hoặc dropdown */
.user-menu:hover + .dropdown,
.dropdown:hover {
    display: block;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s 0s;
}

.calendar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.year-selector {
    margin-bottom: 30px;
    font-size: 18px;
}
select {
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
}
.months-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    justify-items: center;
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
}
.month {
    width: 340px;
    background: rgba(255, 255, 255, 0.7); /* Nền trắng mờ */
    border-radius: 20px; /* Bo góc mềm mại */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Đổ bóng mềm mại */
    padding: 10px;
    text-align: center;
    backdrop-filter: blur(10px); /* Làm mờ nền phía sau */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Thêm viền nhẹ mờ */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hiệu ứng chuyển động khi hover */
    box-sizing: border-box;
}

.month-title {
    color: deeppink;
    text-transform: uppercase;
    font-size: 30px;
    margin: 5px auto;
    font-weight: bold;
    text-align: center;
    position: relative;
    display: inline-block;
    padding: 5px 15px;
    letter-spacing: 1px;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.day {
    background-color: rgba(255, 255, 255, 0.6); /* Nền nhẹ cho các ngày */
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.day:hover {
    background-color: #3498db; /* Nền xanh dương khi hover */
    color: white; /* Chữ trắng khi hover */
}

.event-day {
    background-color: #ff5733;
    color: white;
    font-weight: bold;
    border-radius: 50%; 
}


.event-day:hover {
    background-color: darkred !important;
}

/* Ngày trống */
.day.empty {
    background-color: transparent;
    cursor: default;
}

.days-header {
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    text-align: center;
}
.days-header div {
    width: 40px;
    text-align: center;
    font-size: 18px;
    letter-spacing: 1px;
    color: darkblue;
    padding-bottom: 5px;
    font-family: monospace;

}

/* Footer */
.footer {
    background-color: cornflowerblue;
    color: #fff;
    padding: 10px 0;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.2);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
}

.footer p {
    margin: 0;
}

.event-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.event-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.event-modal-content .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

button {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}


.etext {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    text-align: center;
}

.tevent {
    text-transform: uppercase;
    color: darkblue;
    margin: 0px;
    margin-bottom: 10px;
}

.eform {
    background-color: #3498db;
    padding: 15px;
    border-radius: 20px;

}

/* Modal Styling */
.event-modal {
    display: none; /* Hide by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Darker semi-transparent background */
    justify-content: center; /* Centers the modal horizontally */
    align-items: center; /* Centers the modal vertically */
    z-index: 1000;
    display: flex; /* Enables flexbox for centering */
}

/* Modal Content Styling */
.event-modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px; /* Softer rounded corners */
    width: 450px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); /* More prominent shadow */
    position: relative;
    text-align: center; /* Center text */
    transition: transform 0.3s ease-in-out; /* Smooth transition on open */
}

/* Modal Header (Title) */
.event-modal-content h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Close Button Styling */
.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease; /* Smooth transition for hover */
}

.close:hover {
    color: #333;
}

/* Textarea Styling */
#event-text {
    width: 100%;
    height: 150px;
    padding: 10px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px;
    font-family: Arial, sans-serif;
    resize: vertical; /* Allow resizing vertically */
    box-sizing: border-box;
}

/* Save and Delete Button Styling */
#save-event, #delete-event {
    padding: 12px 25px;
    margin-top: 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 16px;
    width: 100%; /* Full width for buttons */
}

/* Save Button */
#save-event {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}

#save-event:hover {
    background-color: #45a049;
    transform: translateY(-2px); /* Slight hover effect */
}

/* Delete Button */
#delete-event {
    background-color: #f44336;
    color: white;
    font-weight: bold;
}

#delete-event:hover {
    background-color: #e53935;
    transform: translateY(-2px); /* Slight hover effect */
}

/* Adjust button visibility */
#delete-event {
    display: none; /* Hidden by default */
}

@media (max-width: 480px) {
    body {
        margin: 0;
        padding: 0;
        font-family: 'Poppins', sans-serif;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        width: 100%;
        background-image: url('images/event.png'); /* Đảm bảo đường dẫn đúng */
        background-size: cover; /* Đảm bảo ảnh phủ toàn bộ màn hình */
        background-position: center; /* Căn giữa ảnh */
        overflow-x: hidden;
        background-attachment: fixed;
    }
    .calendar-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0;
    }
    .months-container {
        grid-template-columns: repeat(2, 1fr); /* Giảm số cột xuống còn 2 */
        gap: 20px; /* Giảm khoảng cách giữa các tháng */
        justify-items: center;
        width: 100%;
    }

    .month {
        margin-left: -12px;
        margin-bottom: -15px;
        max-width: 175px;
        background: rgba(255, 255, 255, 0.7); /* Nền trắng mờ */
        border-radius: 20px; /* Bo góc mềm mại */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Đổ bóng mềm mại */
        text-align: center;
        backdrop-filter: blur(10px); /* Làm mờ nền phía sau */
        border: 1px solid rgba(255, 255, 255, 0.2); /* Thêm viền nhẹ mờ */
        transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hiệu ứng chuyển động khi hover */
    }
    .month-title {
        font-size: 20px; /* Giảm kích thước tiêu đề */
    }
    
    .days {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 4.5px;
    }

    .day {
        font-size: 8px; /* Giảm kích thước chữ trong các ngày */
        padding: 5px; /* Giảm padding */
    }

    .days-header div {
        font-size: 10px; /* Giảm kích thước font header */
        padding: 5px;
    }
     /* Navbar Logo */
     .navbar-logo {
        display: flex;
        align-items: center; /* Vertically centers the logo and text */
        text-decoration: none;
    }

    .navbar-logo a {
        display: flex;
        align-items: center; /* Ensures logo and text are aligned horizontally */
        text-decoration: none;
        color: black; /* Set text color to black for visibility */
    }

    .navbar-logo img {
        height: 30px; /* Set the height of the logo */
        width: auto;
        margin-right: 10px; /* Space between logo and text */
    }

    .navbar-logo p {
        font-size: 20px;
        font-weight: bold;
        color: darkgreen;
        margin: 0;
        text-transform: uppercase;
    }
    .navbar-nav {
        display: flex;
        gap: 10px;
    }
    
    .nav-item a {
        color: darkblue;
        text-decoration: none;
        font-size: 20px;
        font-weight: bold;
        padding: 8px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: background-color 0.3s ease, color 0.3s ease;
    }
    /* Thanh tìm kiếm */
    .search-bar {
        display: flex;
        align-items: center;
        background-color: #fff;
        border-radius: 10px;
        padding: 5px 10px; /* Reduce padding to make it smaller */
        border: solid 2px darkblue;
        margin-right: 15px;
        margin: 0;
    }

    .search-bar input {
        border: none;
        outline: none;
        background: #fff;
        color: darkblue;
        padding: 5px 20px; /* Adjust padding to make input smaller */
        font-size: 20px; /* Smaller font size for input text */
        width: 150px; /* Reduce the width */
        height: 30px; /* Reduce the height */
    }

    .search-bar input::placeholder {
        color: black;
    }

    .search-bar button {
        border: none;
        background-color: white;
        color: darkblue;
        font-size: 20px; /* Smaller button font size */
        cursor: pointer;
        margin-left: 5px; /* Space between input and button */
        padding: 5px 8px; /* Make button smaller */
    }

    /* User menu */
    .user-menu {
        color: darkblue;
        text-decoration: none;
        padding: 8px;
        font-size: 20px;
        font-weight: bold;
        position: relative;
        cursor: pointer;
        margin-right: 0px;
        margin-top: 5px;
    }

    .user-menu:hover {
        color: #f39c12;
    }

    /* Dropdown menu */
    .dropdown {
        display: none;
        position: absolute;
        top: 100%;
        right: -20px;
        background-color: #333;
        min-width: 100px;
        box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
        z-index: 1;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0s 0.3s;
    }

    .dropdown a {
        color: #fff;
        padding: 10px;
        font-size: 12px;
        text-decoration: none;
        display: block;
        transition: background-color 0.3s ease;
    }

    .dropdown a:hover {
        background-color: #f39c12;
    }

    /* Hiển thị dropdown khi hover vào user menu hoặc dropdown */
    .user-menu:hover + .dropdown,
    .dropdown:hover {
        display: block;
        opacity: 1;
        visibility: visible;
        transition: opacity 0.3s ease, visibility 0s 0s;
    }

    /* Footer */
    .footer {
        background-color: cornflowerblue;
        color: #fff;
        padding: 5px 0; /* Reduce padding to make the footer smaller */
        box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.2);
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        flex-shrink: 0;
        height: 20px;
    }

    /* Footer text */
    .footer p {
        margin: 0;
        font-size: 14px; /* Reduce font size */
    }

    /* Modal Styling */
    .event-modal {
        display: none; /* Hide by default */
    }

}