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

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2035;
    --bg-card-hover: #1e2a45;
    --text-primary: #f0f4ff;
    --text-secondary: #8892a8;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --movies: #ef4444;
    --music: #8b5cf6;
    --news: #f59e0b;
    --info: #10b981;
    --games: #ec4899;
    --maps: #06b6d4;
    --safety: #f97316;
    --radius: 16px;
    --transition: 0.2s ease;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

a { text-decoration: none; color: inherit; }

.kiosk-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* HOME */
.kiosk-home {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2vh 4vw;
}

.kiosk-header {
    text-align: center;
    padding: 2vh 0;
}

.airline-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    color: var(--accent);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 8px var(--accent-glow)); }
    50% { filter: drop-shadow(0 0 20px var(--accent-glow)); }
}

.kiosk-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.kiosk-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

.kiosk-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2vw;
    padding: 2vh 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.kiosk-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2vh 1vw;
    transition: all var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.kiosk-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--tile-color, var(--accent)) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition);
}

.kiosk-tile:active {
    transform: scale(0.96);
    border-color: var(--tile-color, var(--accent));
}

.kiosk-tile:active::before {
    opacity: 0.15;
}

.tile-movies { --tile-color: var(--movies); }
.tile-music { --tile-color: var(--music); }
.tile-news { --tile-color: var(--news); }
.tile-info { --tile-color: var(--info); }
.tile-games { --tile-color: var(--games); }
.tile-maps { --tile-color: var(--maps); }

.tile-icon {
    width: 48px;
    height: 48px;
    color: var(--tile-color, var(--accent));
    margin-bottom: 12px;
}

.tile-icon svg {
    width: 100%;
    height: 100%;
}

.tile-label {
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 1;
}

.tile-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    z-index: 1;
    margin-top: 4px;
}

.kiosk-footer {
    text-align: center;
    padding: 1vh 0;
}

.time {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 4px;
}

/* CATEGORY */
.kiosk-category {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 2vh 4vw;
}

.category-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
}

.back-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 12px;
    flex-shrink: 0;
}

.back-btn:active {
    transform: scale(0.92);
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

.content-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 0 4vw 2vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.content-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}

.content-card:active {
    transform: scale(0.96);
    background: var(--bg-card-hover);
}

.card-thumb {
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-placeholder {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.card-placeholder svg {
    width: 100%;
    height: 100%;
}

.card-info {
    padding: 12px 16px;
}

.card-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 8vh 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* PLAYER */
.kiosk-player {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 2vh 4vw;
}

.player-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
}

.player-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4vw;
}

.video-player {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    background: #000;
}

.image-player {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.audio-player {
    text-align: center;
}

.audio-art {
    width: 200px;
    height: 200px;
    margin: 0 auto 24px;
    color: var(--accent);
    animation: spin 8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.audio-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    animation: none;
}

.audio-controls {
    width: 100%;
    max-width: 400px;
}

.text-content {
    max-width: 700px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.player-info {
    padding: 2vh 4vw;
    text-align: center;
    color: var(--text-secondary);
}

/* SAFETY OVERLAY */
.safety-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.safety-overlay.hidden {
    display: none;
}

.safety-overlay video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.safety-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 3px; }
