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

:root {
    --green: #22c55e;
    --green-glow: #16a34a;
    --red: #ef4444;
    --red-glow: #dc2626;
    --gray: #9ca3af;
    --white-seat: #f8fafc;
    --black-seat: #1e1e1e;
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
}

body {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 2rem;
}

.header-content {
    max-width: 900px;
    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(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

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

.hero h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    max-width: 600px;
    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 rgba(255,255,255,0.05);
}

.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.agreed .stat-number { color: var(--green); }
.stat-card.disagreed .stat-number { color: var(--red); }
.stat-card.pending .stat-number { color: var(--gray); }

.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.green { background: var(--green); }
.dot.red { background: var(--red); }
.dot.gray { background: var(--gray); }
.dot.white-dot { background: var(--white-seat); border: 1px solid #cbd5e1; }
.dot.black { background: var(--black-seat); border: 1px solid #374151; }

.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;
}

.seat-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.seat-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.seat-row-label {
    width: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.seat-gap {
    width: 70px;
    height: 60px;
}

.seat {
    width: 70px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 600;
    font-size: 0.75rem;
    position: relative;
    border: 2px solid transparent;
}

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

.seat .seat-label {
    font-size: 0.85rem;
    font-weight: 700;
}

.seat .seat-owner {
    font-size: 0.6rem;
    font-weight: 400;
    margin-top: 2px;
    opacity: 0.85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60px;
}

.seat.agreed {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 4px 15px rgba(34,197,94,0.3);
    border-color: rgba(255,255,255,0.1);
}

.seat.agreed:hover {
    box-shadow: 0 6px 25px rgba(34,197,94,0.5);
}

.seat.disagreed {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239,68,68,0.3);
    border-color: rgba(255,255,255,0.1);
}

.seat.disagreed:hover {
    box-shadow: 0 6px 25px rgba(239,68,68,0.5);
}

.seat.pending {
    background: linear-gradient(145deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 15px rgba(107,114,128,0.2);
    border-color: rgba(255,255,255,0.05);
}

.seat.pending:hover {
    box-shadow: 0 6px 25px rgba(107,114,128,0.4);
}

.seat.no-owner {
    background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
    color: #64748b;
    border-color: #cbd5e1;
}

.seat.no-owner:hover {
    box-shadow: 0 6px 20px rgba(241,245,249,0.3);
}

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

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

.vote-section {
    margin-bottom: 3rem;
}

.vote-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    max-width: 500px;
    margin: 0 auto;
}

.vote-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.vote-card > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.vote-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.vote-form input {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-size: 1rem;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
    text-transform: uppercase;
    transition: border-color 0.3s;
}

.vote-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.vote-form input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.vote-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-agree {
    background: var(--green);
    color: white;
}

.btn-agree:hover {
    background: var(--green-glow);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34,197,94,0.4);
}

.btn-disagree {
    background: var(--red);
    color: white;
}

.btn-disagree:hover {
    background: var(--red-glow);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239,68,68,0.4);
}

.vote-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.vote-message.success {
    display: block;
    background: rgba(34,197,94,0.15);
    color: var(--green);
    border: 1px solid rgba(34,197,94,0.3);
}

.vote-message.error {
    display: block;
    background: rgba(239,68,68,0.15);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.3);
}

.tooltip {
    position: fixed;
    background: var(--card-bg);
    color: var(--text);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    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 rgba(255,255,255,0.05);
}

@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: 700px) {
    header {
        padding: 0.75rem 1rem;
    }
    .logo h1 {
        font-size: 1.2rem;
    }
    main {
        padding: 1.5rem 0.75rem;
    }
    .hero h2 {
        font-size: 1.3rem;
    }
    .seat {
        width: 50px;
        height: 45px;
    }
    .seat-gap {
        width: 50px;
        height: 45px;
    }
    .seat .seat-label {
        font-size: 0.7rem;
    }
    .seat .seat-owner {
        display: none;
    }
    .seat-row {
        gap: 0.35rem;
    }
    .seat-row-label {
        width: 22px;
        font-size: 0.75rem;
    }
    .stats-bar {
        gap: 0.75rem;
    }
    .stat-card {
        min-width: 90px;
        padding: 0.75rem 1rem;
    }
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
    .vote-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.6rem 0.75rem;
    }
    .logo h1 {
        font-size: 1.05rem;
    }
    .logo .subtitle {
        font-size: 0.65rem;
    }
    .logo svg {
        width: 30px;
        height: 30px;
    }
    main {
        padding: 1rem 0.5rem;
    }
    .hero {
        margin-bottom: 1.25rem;
    }
    .hero h2 {
        font-size: 1.1rem;
    }
    .hero p {
        font-size: 0.82rem;
        line-height: 1.5;
    }
    .stats-bar {
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }
    .stat-card {
        min-width: 75px;
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
    }
    .stat-card .stat-number {
        font-size: 1.2rem;
    }
    .stat-card .stat-label {
        font-size: 0.6rem;
    }
    .legend {
        gap: 0.5rem 0.75rem;
        margin-bottom: 1rem;
    }
    .legend-item {
        font-size: 0.7rem;
        gap: 0.3rem;
    }
    .dot {
        width: 12px;
        height: 12px;
        border-radius: 3px;
    }
    .field-label {
        margin-bottom: 0.75rem;
    }
    .field-label span {
        font-size: 0.7rem;
        padding: 0.3rem 1.25rem;
    }
    .seat-grid {
        gap: 3px;
        margin-bottom: 2rem;
    }
    .seat-row {
        gap: 2px;
    }
    .seat {
        width: 34px;
        height: 34px;
        border-radius: 6px;
        border-width: 1.5px;
    }
    .seat-gap {
        width: 34px;
        height: 34px;
    }
    .seat .seat-label {
        font-size: 0.6rem;
    }
    .seat-row-label {
        width: 14px;
        font-size: 0.6rem;
    }
    .vote-card {
        padding: 1.25rem 1rem;
        border-radius: 12px;
    }
    .vote-card h3 {
        font-size: 1.1rem;
    }
    .vote-card > p {
        font-size: 0.82rem;
    }
    .vote-form input {
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem;
    }
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.88rem;
    }
    footer {
        padding: 1.5rem;
        font-size: 0.7rem;
    }
}

@media (hover: none) {
    .seat:hover,
    .seat.agreed:hover,
    .seat.disagreed:hover,
    .seat.pending:hover,
    .seat.no-owner:hover {
        transform: none;
        box-shadow: none;
    }
}
