/* =======================
   Global & Base
======================= */

body {
    background-color: #f8f9fa;
    font-family: "Prompt", sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}


/* =======================
   Navbar Controls Animation
======================= */

.navbar-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.35s ease, opacity 0.3s ease;
}

.navbar-controls.hidden {
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
}

#toggleControlsBtn i {
    transition: transform 0.3s ease;
}

#toggleControlsBtn.rotated i {
    transform: rotate(180deg);
}


/* =======================
   Sidebar
======================= */

.sidebar {
    background-color: #343a40;
    color: white;
    height: 100%;
    position: fixed;
    top: 56px;
    left: 0;
    width: 350px;
    transition: all 0.3s ease;
    z-index: 1040;
    transform: translateX(-100%);
}

.sidebar.show {
    transform: translateX(0);
}

.sidebar h4 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    text-align: center;
}

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar a:hover,
.sidebar a.active {
    background-color: #495057;
}


/* =======================
   Content
======================= */

.content {
    margin-left: 0;
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    transition: all 0.3s ease;
}


/* =======================
   Card
======================= */

.card {
    max-width: 800px;
    width: 100%;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}


/* =======================
   Rating Section
======================= */

.rating-block {
    margin-bottom: 2rem;
    text-align: center;
    /* ✅ จัดทุกด้านให้อยู่ตรงกลาง */
}


/* ✅ ตัดเลขนำหน้าออก — ให้ label อยู่ตรงกลางทั้งหมด */

.rating-block label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    text-align: center;
    white-space: pre-wrap;
}


/* ✅ ดาวอยู่ตรงกลาง */

.rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.rating .fa-star {
    font-size: 2.5rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
}

.rating .fa-star.checked {
    color: #ffc107;
}


/* =======================
   Buttons
======================= */

button[type="submit"] {
    font-size: 1.1rem;
    padding: 10px 30px;
}


/* =======================
   Dark Mode
======================= */

body.dark {
    background-color: #212529;
    color: #f8f9fa;
}

body.dark .card {
    background-color: #2c2f33;
    color: #fff;
}

body.dark .sidebar {
    background-color: #1c1e21;
}

body.dark .sidebar a {
    color: #ddd;
}

body.dark .sidebar a.active,
body.dark .sidebar a:hover {
    background-color: #343a40;
}

body.dark .navbar {
    background-color: #1c1e21 !important;
    color: #f8f9fa;
}

body.dark .navbar h5 {
    color: #f8f9fa;
}

body.dark .btn-outline-dark {
    border-color: #f8f9fa;
    color: #f8f9fa;
}

body.dark .btn-outline-dark:hover {
    background-color: #f8f9fa;
    color: #212529;
}

body.dark .text-muted {
    color: #c0c0c0 !important;
}

body.dark .rating .fa-star.checked {
    color: #ffd95a;
}


/* =======================
   Responsive
======================= */

@media (min-width: 992px) {
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
}