:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #10b981;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    font-family: 'Outfit', sans-serif;
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Header Area */
.header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.header-logo h1 {
    font-weight: 800;
    font-size: 2.5rem;
    margin: 0;
    background: linear-gradient(to right, #38bdf8, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.header-branch-name {
    margin-top: 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-banner .clock {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-light);
}

/* Content Area */
.main-content {
    display: flex;
    flex: 1;
    padding: 2rem;
    gap: 2rem;
    height: 100%;
}

/* Left: Video/Multimedia */
.media-section {
    flex: 6;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.media-section img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
}

.media-text {
    position: absolute;
    bottom: 30px;
    text-align: center;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Left: Rooms Grid (60%) */
.rooms-section {
    flex: 6;
    display: flex;
    flex-direction: column;
}

/* Right: Queue Info (40%) */
.queue-section {
    flex: 4;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Current active queue */
.active-queue-box {
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(145deg, rgba(30, 41, 59, 1), rgba(15, 23, 42, 1));
    border: 2px solid var(--primary);
    box-shadow: 0 0 30px var(--primary-glow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.active-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.active-number {
    font-size: 8rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 20px var(--primary-glow);
    line-height: 1;
    margin: 1rem 0;
}

.active-room {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.active-service {
    font-size: 1.4rem;
    color: var(--text-light);
    font-weight: 400;
    opacity: 0.8;
}

/* Waiting queues container */
.waiting-queue-box {
    flex: 1;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.waiting-header {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.waiting-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.waiting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--text-muted);
}

.waiting-item.fetching {
    border-left-color: var(--primary);
}

.waiting-number {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #e2e8f0;
}

.waiting-details {
    text-align: right;
}

.waiting-service {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.waiting-room {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-light);
}

/* Text blinking animation */
@keyframes pulse {
    0% {
        opacity: 0.8;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }

    100% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

.pulse-animation {
    animation: pulse 2.5s infinite ease-in-out;
}

/* Rooms Grid Layout */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    align-content: start;
}

.room-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    transition: transform 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
}

.room-card:hover {
    transform: translateY(-5px);
}

.room-card:has(.room-status-active) {
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* OU Selection Page */
body.ou-select-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.ou-container {
    width: 90%;
    max-width: 1400px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    max-height: 90vh;
}

.ou-title {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #38bdf8, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ou-subtitle {
    color: #94a3b8;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.ou-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    overflow-y: auto;
    padding-right: 1rem;
}

@media (max-width: 1200px) {
    .ou-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .ou-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ou-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ou-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ou-btn:hover {
    background: rgba(59, 130, 246, 0.5);
    border-color: #38bdf8;
    transform: translateY(-3px);
}