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

:root {
    --morado: #7c3aed;
    --morado-deep: #5b21b6;
    --morado-glow: rgba(124, 58, 237, 0.45);
    --gold: #e2c275;
    --red: #ef4444;
    --bg: #120a20;
    --card-bg: #1d1233;
    --text: #f5f3ff;
    --text-muted: #b6a6d6;
    --line: rgba(255, 255, 255, 0.08);
}

body {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 50% -10%, #241640 0%, var(--bg) 60%);
    color: var(--text);
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, var(--morado-deep) 0%, #1a0f30 100%);
    border-bottom: 1px solid var(--line);
    padding: 1rem 2rem;
}

.header-content { max-width: 760px; margin: 0 auto; }

.logo { display: flex; align-items: center; gap: 1rem; }

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo .subtitle {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

main { max-width: 760px; margin: 0 auto; padding: 2rem 1rem; }

.hero { text-align: center; margin-bottom: 2rem; }

.hero h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(90deg, #c4b5fd, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 120px;
    border: 1px solid var(--line);
}

.stat-card .stat-number { font-size: 2rem; font-weight: 800; }

.stat-card .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.stat-card.assigned .stat-number { color: #a78bfa; }
.stat-card.available .stat-number { color: var(--gold); }

.legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dot { width: 16px; height: 16px; border-radius: 4px; }
.dot.assigned { background: linear-gradient(145deg, var(--morado), var(--morado-deep)); }
.dot.available { background: transparent; border: 1.5px dashed var(--text-muted); }

.field-label { text-align: center; margin-bottom: 1rem; }

.field-label span {
    display: inline-block;
    background: linear-gradient(90deg, #166534, #22c55e, #166534);
    color: white;
    padding: 0.4rem 2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.box-area {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.corridor {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.4rem;
    border: 1px dashed var(--line);
    border-radius: 12px;
    color: var(--text-muted);
}

.corridor span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.seat-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.seat-row { display: flex; gap: 0.6rem; justify-content: center; }

.seat {
    width: 88px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-weight: 600;
    position: relative;
    border: 2px solid transparent;
}

.seat:hover { transform: translateY(-3px); z-index: 10; }

.seat .seat-label { font-size: 0.9rem; font-weight: 800; }

.seat .seat-owner {
    font-size: 0.62rem;
    font-weight: 500;
    margin-top: 2px;
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 78px;
}

.seat.assigned {
    background: linear-gradient(145deg, var(--morado), var(--morado-deep));
    color: white;
    box-shadow: 0 4px 18px var(--morado-glow);
    border-color: rgba(226, 194, 117, 0.35);
}

.seat.assigned:hover { box-shadow: 0 8px 28px var(--morado-glow); }

.seat.available {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border: 2px dashed rgba(182, 166, 214, 0.4);
}

.seat.available:hover { border-color: var(--gold); color: var(--text); }

.seat.not-available {
    background: linear-gradient(145deg, #1e1e1e, #111);
    color: #555;
    border-color: #333;
    cursor: not-allowed;
}

.seat.not-available:hover { transform: none; }

.tooltip {
    position: fixed;
    background: var(--card-bg);
    color: var(--text);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1.5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
    border: 1px solid rgba(226, 194, 117, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.tooltip.visible { opacity: 1; }

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--line);
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.loading {
    animation: pulse 1.5s ease-in-out infinite;
    color: var(--text-muted);
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
}

@media (max-width: 560px) {
    header { padding: 0.75rem 1rem; }
    .logo h1 { font-size: 1.2rem; }
    main { padding: 1.5rem 0.75rem; }
    .hero h2 { font-size: 1.4rem; }
    .hero p { font-size: 0.88rem; }
    .stats-bar { gap: 0.75rem; }
    .stat-card { min-width: 92px; padding: 0.75rem 1rem; }
    .stat-card .stat-number { font-size: 1.6rem; }
    .seat { width: 78px; height: 58px; }
    .seat .seat-owner { max-width: 68px; }
}

@media (max-width: 400px) {
    .logo h1 { font-size: 1.05rem; }
    .hero h2 { font-size: 1.2rem; }
    .seat-grid { gap: 0.45rem; }
    .seat-row { gap: 0.45rem; }
    .seat { width: 62px; height: 52px; border-radius: 10px; }
    .seat .seat-label { font-size: 0.8rem; }
    .seat .seat-owner { font-size: 0.55rem; max-width: 54px; }
}

@media (hover: none) {
    .seat:hover,
    .seat.assigned:hover,
    .seat.available:hover { transform: none; box-shadow: none; }
    .seat.assigned:hover { box-shadow: 0 4px 18px var(--morado-glow); }
}
