/* Root Variables */
:root {
    --primary-color: #1a237e;
    --secondary-color: #0d47a1;
    --accent-color: #2962ff;
    --background-light: #f5f5f5;
    --text-color: #333333;
    --border-radius: 10px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --header-height: 80px;
    --footer-height: 60px;
    --content-padding: 20px;
}


input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
}


/* Base Styles */
body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--background-light);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--content-padding);
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    color: white;
    height: var(--header-height);
    box-sizing: border-box;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.header-icon {
    font-size: 2rem;
    line-height: 1;
}

.header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
}

@media (max-width: 768px) {
    .header-content {
        gap: 10px;
    }
    
    .header-icon {
        font-size: 1.8rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
}

/* Content Area */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
}

/* Student Profile */
.student-rooms-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
}

.student-profile {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.student-profile-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.student-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    flex-shrink: 0;
}

/* Rooms Grid */
.rooms-container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.rooms-grid {
    display: grid;
    gap: 20px;
    padding: 10px;
    margin: 0 auto;
    max-width: 1920px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Regular screen - 4 columns max */
@media (min-width: 1200px) {
    .rooms-grid {
        grid-template-columns: repeat(4, minmax(250px, 1fr));
    }
}

/* Room Cards */
.room-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.room-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.room-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.room-details h5 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Fullscreen Mode */
body.fullscreen {
    overflow: hidden;
}

.fullscreen .main-container {
    max-width: none;
    padding: 15px;
}

.fullscreen .content {
    height: calc(100vh - var(--header-height) - var(--footer-height) - 30px);
}

.fullscreen .rooms-container {
    overflow: auto;
}

.fullscreen .rooms-grid {
    height: auto;
    grid-template-columns: repeat(4, 1fr);
    padding: 20px;
    gap: 25px;
}

/* Fullscreen responsive breakpoints */
@media (min-width: 1921px) {
    .fullscreen .rooms-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1600px) {
    .fullscreen .rooms-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .fullscreen .rooms-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .fullscreen .rooms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .student-profile-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 15px 0;
    height: var(--footer-height);
    box-sizing: border-box;
    width: 100%;
}



/* Fullscreen Button */
.btn-fullscreen {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.btn-fullscreen:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

/* Search Section */
.search-section {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.search-input-container {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(41, 98, 255, 0.2);
}

/* Room Selection Button */
.btn-select {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    font-weight: 500;
    width: 100%;
}

.btn-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Alert Messages */
.alert {
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    border: none;
    box-shadow: var(--box-shadow);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Scrollbar Styling */
.rooms-grid::-webkit-scrollbar {
    width: 8px;
}

.rooms-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.rooms-grid::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.rooms-grid::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}




/* Room Header Styling */
.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.room-header h5 {
    margin: 0;
    font-size: 1rem;      /* ปรับขนาดหัวข้อให้สมดุล */
    font-weight: 600;
    color: var(--primary-color);
    flex: 1;
}

.remaining-seats {
    background: var(--accent-color);
    color: white;
    padding: 3px 8px;      /* ลดขนาด padding */
    border-radius: 15px;    /* ปรับขนาด border-radius */
    font-size: 0.75rem;    /* ลดขนาดตัวอักษร */
    font-weight: 500;
    display: inline-flex;  /* เปลี่ยนเป็น inline-flex */
    align-items: center;
    gap: 4px;             /* ลดระยะห่างระหว่างไอคอนกับตัวเลข */
    white-space: nowrap;
}

.remaining-seats i {
    font-size: 0.7rem;    /* ลดขนาดไอคอน */
}

/* Update existing room-details class */
.room-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: white;
}

/* Optional: Add hover effect to room card */
.room-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}


