@import url('https://fonts.googleapis.com/css2?family=Bubblegum+Sans&display=swap');

body {
    background: linear-gradient(135deg, #FFB6C1 0%, #FFA8D0 25%, #87CEEB 75%, #98D8F0 100%);
    color: #333;
    font-family: 'Bubblegum Sans', cursive;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background gradient animation disabled for better performance */
/* @keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
} */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 182, 193, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(135, 206, 235, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container-fluid {
    position: relative;
    z-index: 1;
    padding: 1rem;
}

@keyframes newCustomer {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-color: #FFF;
    }
    25% {
        transform: translateY(-10px) scale(1.05);
        box-shadow: 0 15px 25px rgba(0,0,0,0.2);
        border-color: #FF69B4;
    }
    50% {
        transform: translateY(0) scale(1);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-color: #4CAF50;
    }
    75% {
        transform: translateY(-10px) scale(1.05);
        box-shadow: 0 15px 25px rgba(0,0,0,0.2);
        border-color: #2196F3;
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes rainbowRotate {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.1);
    }
}

@keyframes sparkle {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.15);
        opacity: 0.9;
    }
}

@keyframes circusBounce {
    0%, 100% { 
        transform: translateY(0);
    }
    50% { 
        transform: translateY(-5px);
    }
}

@keyframes artPulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.1);
    }
}

.service-card.new-customer {
    animation: newCustomer 4s ease-in-out;
    animation-iteration-count: 5;
    animation-fill-mode: both;
    will-change: transform, box-shadow, border-color;
}

.display-board {
    margin: 0;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.board-title {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #FF4081;
    text-shadow: 3px 3px 0 #FFF,
                 -3px 3px 0 #FFF,
                 3px -3px 0 #FFF,
                 -3px -3px 0 #FFF,
                 0 0 20px rgba(255, 64, 129, 0.3);
    animation: bounce 2s infinite;
    height: auto;
    opacity: 1;
    letter-spacing: 2px;
    font-weight: bold;
}

.currently-serving {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 245, 250, 0.95) 100%);
    border-radius: 30px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 5px solid #FF69B4;
    box-shadow: 0 15px 35px rgba(255, 105, 180, 0.3),
                0 5px 15px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.currently-serving h2 {
    color: #FF69B4;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.service-grid.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.service-grid.fade-in {
    opacity: 1;
    transform: scale(1);
    animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.service-card {
    background: linear-gradient(135deg, #FFF0F5 0%, #E0F2FF 100%);
    border-radius: 25px;
    padding: 1.5rem;
    text-align: center;
    border: 3px solid #FFF;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15),
                0 3px 10px rgba(255, 105, 180, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2),
                0 5px 15px rgba(255, 105, 180, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.avatar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.avatar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.employee-avatar, .customer-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25),
                0 0 0 3px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    background: white;
    padding: 3px;
    text-align: center;
    object-fit: cover;
}

.service-card:hover .employee-avatar,
.service-card:hover .customer-avatar {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3),
                0 0 0 4px rgba(255, 255, 255, 0.9);
}

.employee-avatar {
    border: 4px solid #4CAF50;
}

.customer-avatar {
    border: 4px solid #FF69B4;
}

.avatar-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    text-align: center;
}

.ticket-number {
    font-size: 3.5rem;
    font-weight: bold;
    color: #FF69B4;
    margin: 0.5rem 0;
    text-shadow: 3px 3px 0 #FFF,
                 0 0 10px rgba(255, 105, 180, 0.5);
    letter-spacing: 2px;
    transition: transform 0.3s ease;
}

.service-card:hover .ticket-number {
    transform: scale(1.1);
}

.employee-name {
    font-size: 1.5rem;
    color: #4CAF50;
}

.waiting-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 255, 240, 0.95) 100%);
    border-radius: 30px;
    padding: 2.5rem;
    border: 5px solid #4CAF50;
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.3),
                0 5px 15px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

.waiting-section h2 {
    color: #4CAF50;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.waiting-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.waiting-number {
    background: linear-gradient(135deg, #F0FFF0 0%, #E8F5FF 100%);
    border-radius: 25px;
    padding: 1.5rem;
    text-align: center;
    min-width: 200px;
    border: 3px solid #FFF;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12),
                0 3px 10px rgba(33, 150, 243, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.waiting-number.sent-back {
    border: 3px solid #dc3545 !important;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.6) !important,
                0 5px 20px rgba(220, 53, 69, 0.4) !important;
    background: linear-gradient(135deg, #ffe5e5 0%, #ffcccc 100%) !important;
    animation: pulseRed 2s ease-in-out infinite;
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 0 15px rgba(220, 53, 69, 0.6), 0 5px 20px rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 0 25px rgba(220, 53, 69, 0.8), 0 8px 30px rgba(220, 53, 69, 0.6); }
}

.waiting-number:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18),
                0 5px 15px rgba(33, 150, 243, 0.25);
}

.waiting-number .customer-avatar {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2),
                0 0 0 3px rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
    object-fit: cover;
}

.waiting-number:hover .customer-avatar {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3),
                0 0 0 4px rgba(255, 255, 255, 0.9);
}

.number {
    font-size: 2.8rem;
    font-weight: bold;
    color: #2196F3;
    text-shadow: 3px 3px 0 #FFF,
                 0 0 10px rgba(33, 150, 243, 0.4);
    letter-spacing: 1px;
    transition: transform 0.3s ease;
}

.waiting-number:hover .number {
    transform: scale(1.1);
}

.wait-time {
    font-size: 1.2rem;
    color: #555;
    margin-top: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
}

.info-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 250, 245, 0.95) 100%);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #555;
    font-size: 1.3rem;
    border: 3px solid #FFF;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.timestamp {
    font-size: 1.3rem;
    color: #FFF;
    text-align: center;
    margin-top: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3),
                 0 0 10px rgba(255, 255, 255, 0.3);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    display: inline-block;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}


/* Primary Queue */
.primary-queue {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* Secondary Queue */
.secondary-queue {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 0 -1rem;
    height: 400px;
    overflow: hidden;
    position: relative;
    animation-play-state: paused;
}

.secondary-queue-content {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    animation: scrollQueue 30s linear infinite;
    animation-play-state: paused;
}

.secondary-clone {
    display: flex;
    flex-direction: column;
}

.secondary-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.secondary-row .waiting-number.small {
    padding: 0.5rem;
    min-width: 150px;
}

.secondary-row .waiting-number.small.sent-back {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.5) !important;
    background: linear-gradient(45deg, #ffe5e5, #ffe5e5) !important;
}

.secondary-row .waiting-number.small .customer-avatar {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
}

.secondary-row .waiting-number.small .number {
    font-size: 1.5rem;
}

.secondary-row .waiting-number.small .wait-time {
    font-size: 0.8rem;
}

.secondary-row .waiting-number.small:hover {
    transform: none;
}

@keyframes scrollQueue {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-50%);
    }
}

@media screen and (min-width: 2160px) {
    .primary-queue {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .primary-queue .waiting-number {
        padding: 2rem;
    }
    .secondary-row {
        gap: 1.5rem;
    }
    .secondary-row .waiting-number.small {
        min-width: 180px;
    }
}

@media (max-width: 1400px) {
    .secondary-row {
        gap: 0.5rem;
    }
    .secondary-row .waiting-number.small {
        min-width: 130px;
    }
}

@media (max-width: 992px) {
    .primary-queue {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .secondary-row .waiting-number.small {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .primary-queue {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .secondary-queue {
        height: auto;
        max-height: 400px;
        overflow-y: auto;
    }
}

.logo-container {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 10;
}

.display-logo {
    max-width: 200px;
    height: auto;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .logo-container {
        bottom: 1rem;
        right: 1rem;
    }
    .display-logo {
        max-width: 120px;
    }
}

.more-tickets-info {
    text-align: center;
    font-size: 1.8rem;
    color: #555;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* Emoji Animations - Optimized for performance */
.emoji-rainbow {
    display: inline-block;
    animation: rainbowRotate 3s ease-in-out infinite;
    font-size: 1em;
    will-change: transform;
}

.emoji-sparkle {
    display: inline-block;
    animation: sparkle 3s ease-in-out infinite;
    font-size: 1.5rem;
    will-change: transform;
}

.emoji-circus {
    display: inline-block;
    animation: circusBounce 2.5s ease-in-out infinite;
    font-size: 1em;
    will-change: transform;
}

.emoji-art {
    display: inline-block;
    animation: artPulse 2.5s ease-in-out infinite;
    font-size: 1em;
    will-change: transform;
}