/* Create By Chanaphon All Rights Reserved  */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --background-color: linear-gradient(145deg, #abe0ff, #403be7);
    --bg-class: linear-gradient(145deg, #226589, #8683cd);
    --bg-marquee: linear-gradient(to right, #d13434, #e06f6f);
    --bg-button: #e51e39;
    --bg-cover-button: #b62034;
    --text-button: white;
    --text-color: #ffffff;
    --h1-color: #f8f8f8;
    --register-link: #2600ff;
}

body.dark-theme {
    --background-color: linear-gradient(135deg, #2d2d2d, #392727);
    --bg-class: linear-gradient(145deg, rgb(56, 53, 53), #4e3030);
    --bg-marquee: linear-gradient(to right, #007bff, #00c6ff);
    --bg-button: #1e88e5;
    --bg-cover-button: #1565c0;
    --text-button: white;
    --text-color: #ffffff;
    --h1-color: #5eb1ff;
    --register-link: #007bff;
}

#classroom-group {display: none;}
#classroom-group.visible {display: block;}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--background-color);
    color: var(--text-color); 
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    flex-direction: column;
    /* cursor: none; */
}

/* #cursor {
    position: absolute;
    width: 40px; 
    height: 40px; 
    background-image: url('image/mouse.png'); 
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
    transform: translate(-50%, -50%);
} */

#snow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.header {
    display: flex;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.login-btn {
    background-color: var(--bg-button);
    color: white;
    padding: 15px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    width: 100%;
    border: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.login-btn:hover {
    background-color: var(--bg-cover-button);
    transform: translateY(-2px);
}

.logout-btn {
    background-color: #ff4081;
	margin: 0 10px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.logout-btn:hover {
    background-color: #f50057;
    transform: translateY(-5px);
}


.footer {
    display: flex;
    justify-content: end;
    align-items: center;
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

.footer-text {
    font-size: 16px;
    font-weight: bold;
    justify-content: center;
    color: var(--text-color);
}

.footer .theme-switch {
    display: flex;
    align-items: end;
    width: 80px;
    height: 40px;
    position: relative;
    margin-right: 20px;
}
.footer .theme-switch input[type="checkbox"] {
    display: none;
}
.footer .slider {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #1e1e1e, #004f89);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    transition: background 0.4s ease;
    cursor: pointer;
}

.footer .slider .icon {
    font-size: 24px;
    color: white;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.footer .slider .sun {
    color: #ffdd4f;
}

.footer .slider .moon {
    color: #2196f3;
    opacity: 0;
    transform: scale(0);
}

.footer input[type="checkbox"]:checked + .slider {
    background: linear-gradient(90deg, #004f89, #1e1e1e);
}

.footer input[type="checkbox"]:checked + .slider .sun {
    opacity: 0;
    transform: scale(0);
}

.footer input[type="checkbox"]:checked + .slider .moon {
    opacity: 1;
    transform: scale(1);
}

.footer .theme-label {
    font-size: 1rem;
    color: #fff;
    margin-left: 10px;
}


.container {
    background: var(--bg-class);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    padding: 20px;
    width: 100%;
    max-width: 900px;
    text-align: center;
    transition: all 0.3s ease-in-out;
}

/* .container:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
} */

.custom-select {
    appearance: none; 
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    width: 150px;
    transition: all 0.3s ease;
}

.custom-select:focus {
    border-color: #4CAF50; 
    box-shadow: 0 0 5px rgba(0, 128, 0, 0.3);
}

.custom-select-wrapper {
    position: relative;
    display: inline-block;
}

.custom-select-wrapper::after {
    content: "▼";
    color: rgb(66, 66, 66);
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
}

h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--h1-color);
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.add-btn {
    background-color: #4CAF50;
    color: white;
    font-size: 1.1rem;
    padding: 12px 25px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-bottom: 20px;
}

.add-btn:hover {
    background-color: #45a049;
    transform: translateY(-5px);
}

.form-container {
    display: none;
    background-color: #2c2c2c;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
}

.form-container form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-container input {
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #444;
    background-color: #333;
    color: #fff;
}

.form-container input:focus {
    border-color: #00bcd4;
    outline: none;
}

.submit-btn {
    background-color: #00bcd4;
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #0097a7;
}

.cancel-btn {
    background-color: #f44336;
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cancel-btn:hover {
    background-color: #d32f2f;
}

.class-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.class-table th, .class-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #444;
}

.class-table th {
    background-color: #00bcd4;
    color: white;
}

.class-table td {
    background-color: #333;
    color: white;
}

.class-table tbody tr:hover {
    background-color: #444;
}

.edit-btn, .delete-btn, .password-btn {
    padding: 8px 12px;
    border-radius: 5px;
    color: white;
    border: none;
    cursor: pointer;
}

.password-btn {
    background-color: #15d415;
}

.password-btn:hover {
    background-color: #14b306;
}

.edit-btn {
    background-color: #ffc107;
}

.delete-btn {
    background-color: #f44336;
}

.edit-btn:hover {
    background-color: #ff9800;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

.class-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    padding: 10px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.1);
    font-size: 1rem;
}

.time, .outfit {
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #aaaaaa;
}

.class-info span {
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    line-height: 1.5;
}

.login-container {
    background-color: var(--bg-class);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin-top: 60px;
}

.input-group {
    margin-bottom: 25px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.input-group label {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #ddd;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    margin-top: 5px;
}

.input-group input:focus {
    border-color: #1e88e5;
    outline: none;
}


.error-message {
    margin-top: 15px;
    color: #ff0000;
    font-size: 0.9rem;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #2d2d2d;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    text-align: center;
    color: white;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #00bcd4;
    font-size: 1.8rem;
}

.modal-content input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    font-size: 1rem;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
}

.modal-content input:focus {
    border-color: #00bcd4;
    outline: none;
}

.submit-btn, .cancel-btn {
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn {
    background-color: #00bcd4;
    color: white;
}

.submit-btn:hover {
    background-color: #0097a7;
}

.cancel-btn {
    background-color: #f44336;
    color: white;
}

.cancel-btn:hover {
    background-color: #d32f2f;
}

.toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #4CAF50;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.toast.show {
    visibility: visible;
    opacity: 1;
}

.day-selector {
    margin-bottom: 20px;
    font-family: 'Arial', sans-serif;
}

.day-selector label {
    font-size: 16px;
    margin-right: 10px;
    font-weight: bold;
    color: #333;
}

.select-container {
    position: relative;
    width: 200px;
}

select {
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    color: #333;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select:hover {
    background-color: #e0e0e0;
}

select:focus {
    outline: none;
    border-color: #4CAF50;
}

select::-ms-expand {
    display: none;
}

.select-container::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #999;
    pointer-events: none;
}

.horizontal-buttons {
    display: flex;
    justify-content: center; 
    gap: 10px; 
    margin-top: 20px;
}
.horizontal-buttons button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s;
}
.horizontal-buttons button:hover {
    background-color: #0056b3;
}

.navigate-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px; 
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

.navigate-btn:hover {
    background-color: #45a049;
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .login-container {
        padding: 20px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .class-info {
        font-size: 0.9rem;
    }

    .input-group input {
        font-size: 1rem;
    }

    .login-btn {
        font-size: 1rem;
    }
}

#snow-toggle {
    top: 10px;
    right: 10px;
    z-index: 1000;
    padding: 10px 20px;
    background-color: var(--bg-button);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}
#snow-toggle:focus {
    outline: none;
}

.register-link p {
    color: #ffffff; 
}

.register-link a {
    color: var(--register-link); 
    text-decoration: underline; 
    font-weight: bold; 
    transition: color 0.3s ease; 
}

.register-link a:hover {
    color: #0056b3; 
    text-decoration: none; 
}

.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    width: 100%;
    padding: 13px 45px 13px 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; 
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 1rem;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #222;
}

.toggle-password:focus {
    outline: none;
}

.marquee-container {
	position: relative;
	overflow: hidden; 
	white-space: nowrap;
	width: 100%;
	max-width: 600px;
	margin: 10px auto;
	background: var(--bg-marquee);
	padding: 8px 10px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	color: white;
	font-size: 0.9rem;
	font-family: 'Arial', sans-serif;
}

.marquee-text {
	display: inline-block;
	animation: marquee 9s linear infinite;
}

@keyframes marquee {
	0% {
		transform: translateX(100%); 
	}
	100% {
		transform: translateX(-100%);
	}
}

.announcement-icon {
	margin-right: 8px;
	font-size: 1rem; 
}