* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Animación de fondo con burbujas */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: rise 15s infinite ease-in;
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-duration: 12s;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 30%;
    animation-duration: 14s;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 50%;
    animation-duration: 16s;
    animation-delay: 4s;
}

.bubble:nth-child(4) {
    width: 70px;
    height: 70px;
    left: 70%;
    animation-duration: 13s;
    animation-delay: 1s;
}

.bubble:nth-child(5) {
    width: 90px;
    height: 90px;
    left: 90%;
    animation-duration: 15s;
    animation-delay: 3s;
}

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0);
    }

    50% {
        transform: translateX(100px);
    }

    100% {
        bottom: 110vh;
        transform: translateX(-100px);
    }
}

.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.main-header h1 {
    color: white;
    font-size: 1.8em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.current-time {
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.clientes-list {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.cliente-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 20px;
    padding: 20px 30px;
    border-bottom: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    align-items: center;
    position: relative;
}

.cliente-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

.cliente-row.normal {
    background: linear-gradient(90deg, rgba(79, 172, 254, 0.05) 0%, transparent 100%);
}

.cliente-row.normal::before {
    background: linear-gradient(180deg, #4facfe, #00f2fe);
}

.cliente-row.warning {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.1) 0%, transparent 100%);
    animation: pulse-row 2s infinite;
}

.cliente-row.warning::before {
    background: linear-gradient(180deg, #ff9800, #ff6f00);
}

.cliente-row.danger {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.15) 0%, transparent 100%);
    animation: shake-row 0.5s infinite;
}

.cliente-row.danger::before {
    background: linear-gradient(180deg, #ff6b6b, #ee5a6f);
}

.cliente-row.libre {
    background: linear-gradient(90deg, rgba(67, 233, 123, 0.05) 0%, transparent 100%);
}

.cliente-row.libre::before {
    background: linear-gradient(180deg, #43e97b, #38f9d7);
}

@keyframes pulse-row {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.01);
    }
}

@keyframes shake-row {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    75% {
        transform: translateX(3px);
    }
}

.cliente-row:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    transform: scale(1.02);
}

.cliente-row:last-child {
    border-bottom: none;
}

.cliente-nombre {
    font-size: 1.4em;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cliente-icono {
    font-size: 1.5em;
}

.cliente-entrada,
.cliente-salida {
    font-size: 1.1em;
    color: #666;
    text-align: center;
}

.cliente-entrada strong,
.cliente-salida strong {
    display: block;
    color: #999;
    font-size: 0.85em;
    margin-bottom: 5px;
    font-weight: 600;
}

.cliente-tiempo {
    text-align: center;
}

.tiempo-restante {
    font-size: 2.5em;
    font-weight: 700;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.cliente-row.warning .tiempo-restante {
    color: #ff9800;
}

.cliente-row.danger .tiempo-restante {
    color: #ff6b6b;
}

.cliente-row.libre .tiempo-restante {
    color: #43e97b;
}

.tiempo-label {
    font-size: 0.9em;
    color: #999;
    margin-top: 5px;
    font-weight: 600;
}

.tiempo-extra-info {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 0.95em;
    color: #856404;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.empty-icon {
    font-size: 5em;
    margin-bottom: 15px;
}

.empty-state h2 {
    color: #667eea;
    font-size: 1.8em;
    margin: 0;
}

.main-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px;
    text-align: center;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.main-footer p {
    color: white;
    font-size: 1em;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .logo {
        height: 40px;
    }

    .main-header h1 {
        font-size: 1.5em;
    }

    .current-time {
        font-size: 1em;
    }

    .cliente-row {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }

    .cliente-nombre {
        font-size: 1.2em;
    }

    .tiempo-restante {
        font-size: 2em;
    }

    .cliente-entrada,
    .cliente-salida,
    .cliente-tiempo {
        text-align: left;
    }
}

.hidden {
    display: none;
}