/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    touch-action: pan-x pan-y;
    overscroll-behavior: none;
}

:root {
    --red: #FF6B6B;
    --red-light: #FFE0E0;
    --blue: #4ECDC4;
    --blue-light: #D0F4F1;
    --yellow: #FFE66D;
    --yellow-light: #FFF8D6;
    --green: #95E97A;
    --green-light: #E2F9D8;

    --sky-top: #1a1c3a;
    --sky-mid: #2d3561;
    --sky-bottom: #4a3f7a;
    --bg-glass: rgba(255, 255, 255, 0.08);
    --bg-glass-strong: rgba(255, 255, 255, 0.14);
    --bg-glass-card: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.15);
    --text-primary: #f0f0f8;
    --text-secondary: #b0b4d0;
    --accent: #FF7E5F;
    --accent-glow: rgba(255, 126, 95, 0.4);
    --accent-2: #FEB47B;
    --btn-primary-bg: linear-gradient(135deg, #FF7E5F 0%, #FEB47B 100%);
    --btn-secondary-bg: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 4px 20px var(--accent-glow);
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(170deg, var(--sky-top) 0%, var(--sky-mid) 40%, var(--sky-bottom) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* === Sky Background Decorations === */
.sky-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
}

.cloud-1 { width: 300px; height: 100px; top: 10%; left: -5%; animation: cloud-drift 40s linear infinite; }
.cloud-2 { width: 250px; height: 80px; top: 30%; left: 10%; animation: cloud-drift 55s linear infinite; animation-delay: -15s; }
.cloud-3 { width: 350px; height: 120px; top: 60%; left: -10%; animation: cloud-drift 50s linear infinite; animation-delay: -25s; }
.cloud-4 { width: 200px; height: 70px; top: 80%; left: 5%; animation: cloud-drift 45s linear infinite; animation-delay: -8s; }

@keyframes cloud-drift {
    0%   { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 400px)); }
}

.stars {
    position: absolute;
    width: 100%; height: 100%;
    background-image:
        radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 70% 25%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1.5px 1.5px at 85% 60%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 95% 80%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1.5px 1.5px at 60% 50%, rgba(255,255,255,0.45), transparent),
        radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.35), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.4), transparent);
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0%   { opacity: 0.6; }
    100% { opacity: 1; }
}

/* === Screens === */
.screen {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.screen.active {
    display: flex;
}

/* === Loading Screen === */
#screen-loading {
    background: transparent;
}

.loading-content {
    text-align: center;
}

.plane-icon {
    font-size: 80px;
    animation: plane-fly 3s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(255, 126, 95, 0.3));
}

@keyframes plane-fly {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-25px) rotate(3deg); }
}

.loading-content h1 {
    font-size: 2.5rem;
    margin: 20px 0 30px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), #FFE66D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    text-shadow: none;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--bg-glass-strong);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

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

/* === Glass-morph Cards === */
.glass-card {
    background: var(--bg-glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* === Buttons === */
.btn {
    padding: 12px 32px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--accent-glow);
    filter: brightness(1.08);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: saturate(0.5);
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: var(--bg-glass-strong);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.2rem;
    border-radius: 50px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--bg-glass-strong);
}

/* === Home Screen === */
.home-content {
    text-align: center;
    padding: 20px;
}

.home-header {
    margin-bottom: 40px;
}

.plane-logo {
    font-size: 90px;
    animation: plane-fly 3.5s ease-in-out infinite;
    filter: drop-shadow(0 12px 30px rgba(255, 126, 95, 0.35));
}

.home-header h1 {
    font-size: 2.8rem;
    margin: 16px 0 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), #FFE66D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

/* === Lobby Screen === */
.lobby-content {
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 480px;
}

.lobby-content h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lobby-players {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.player-slot {
    background: var(--bg-glass-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 2px solid transparent;
    transition: all 0.3s;
    min-height: 110px;
    justify-content: center;
}

.player-slot.occupied {
    border-color: rgba(255, 255, 255, 0.25);
    background: var(--bg-glass-strong);
}

.player-slot.self {
    border-color: var(--accent);
    background: rgba(255, 126, 95, 0.12);
    box-shadow: 0 0 20px rgba(255, 126, 95, 0.15);
}

.player-slot .player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.player-slot .player-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.player-slot.empty {
    opacity: 0.35;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.15);
}

.player-slot.empty .player-avatar {
    font-size: 1.8rem;
    opacity: 0.4;
}

.lobby-info {
    margin-bottom: 20px;
}

#lobby-status {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.scan-animation {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 0 auto;
}

.scan-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: scan-pulse 2s ease-out infinite;
    opacity: 0;
}

.scan-ring:nth-child(2) { animation-delay: 0.6s; }
.scan-ring:nth-child(3) { animation-delay: 1.2s; }

@keyframes scan-pulse {
    0%   { transform: scale(0.3); opacity: 0.7; }
    100% { transform: scale(1.5); opacity: 0; }
}

.lobby-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

/* === Room Code Display === */
.room-code-display {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg-glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius);
    border: 2px solid rgba(255, 126, 95, 0.3);
    box-shadow: 0 0 30px rgba(255, 126, 95, 0.1);
}

.room-code-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.room-code-value {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
    transition: transform 0.15s;
}

.room-code-value:active {
    transform: scale(0.95);
}

.room-code-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
    opacity: 0.7;
}

/* === Join Room Modal === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 10, 30, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.modal-content {
    background: linear-gradient(170deg, rgba(45, 53, 97, 0.95), rgba(26, 28, 58, 0.95));
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 30px;
    width: 90%;
    max-width: 350px;
    text-align: center;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow);
}

.modal-content h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.room-code-input-group {
    margin-bottom: 24px;
}

.room-code-input {
    -webkit-user-select: text;
    user-select: text;
    width: 180px;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 10px;
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Courier New', Courier, monospace;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.room-code-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(255, 126, 95, 0.2);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* === Game Screen === */
#screen-game {
    justify-content: flex-start;
    background: transparent;
}

.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
}

.current-turn {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
}

.turn-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px currentColor;
}

.game-board-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    width: 100%;
    overflow: hidden;
}

#game-board {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.game-controls {
    width: 100%;
    padding: 10px 16px 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-glass);
}

.dice-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

/* 3D Dice */
.dice-viewport {
    width: 70px;
    height: 70px;
    perspective: 400px;
    perspective-origin: 50% 50%;
}

.dice3d {
    width: 60px;
    height: 60px;
    position: relative;
    transform-style: preserve-3d;
    transform: translateZ(-30px) rotateX(-25deg) rotateY(25deg);
    transition: transform 0.15s ease-out;
    margin: 5px;
    --final-rx: 720deg;
    --final-ry: 540deg;
}

.dice3d.throwing {
    animation: dice-throw 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes dice-throw {
    0%   { transform: translateZ(-30px) translateY(0px)   rotateX(0deg)    rotateY(0deg)    rotateZ(0deg); }
    15%  { transform: translateZ(-30px) translateY(-80px)  rotateX(180deg)  rotateY(90deg)   rotateZ(45deg); }
    30%  { transform: translateZ(-30px) translateY(-110px) rotateX(360deg)  rotateY(200deg)  rotateZ(90deg); }
    50%  { transform: translateZ(-30px) translateY(-40px)  rotateX(540deg)  rotateY(350deg)  rotateZ(135deg); }
    65%  { transform: translateZ(-30px) translateY(-20px)  rotateX(650deg)  rotateY(440deg)  rotateZ(160deg); }
    80%  { transform: translateZ(-30px) translateY(5px)    rotateX(700deg)  rotateY(500deg)  rotateZ(175deg); }
    90%  { transform: translateZ(-30px) translateY(-5px)   rotateX(710deg)  rotateY(520deg)  rotateZ(178deg); }
    100% { transform: translateZ(-30px) translateY(0px)    rotateX(var(--final-rx)) rotateY(var(--final-ry)) rotateZ(180deg); }
}

.dice3d-face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.04);
}

.dice3d-front  { transform: rotateY(0deg) translateZ(30px); }
.dice3d-back   { transform: rotateY(180deg) translateZ(30px); }
.dice3d-right  { transform: rotateY(90deg) translateZ(30px); }
.dice3d-left   { transform: rotateY(-90deg) translateZ(30px); }
.dice3d-top    { transform: rotateX(90deg) translateZ(30px); }
.dice3d-bottom { transform: rotateX(-90deg) translateZ(30px); }

.dice3d-face .dot {
    position: absolute;
    width: 11px;
    height: 11px;
    background: radial-gradient(circle, #333 60%, #555);
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
}
.dot.tl { top: 10px; left: 10px; }
.dot.tr { top: 10px; right: 10px; }
.dot.ml { top: 50%; left: 10px; transform: translateY(-50%); }
.dot.mr { top: 50%; right: 10px; transform: translateY(-50%); }
.dot.bl { bottom: 10px; left: 10px; }
.dot.br { bottom: 10px; right: 10px; }
.dot.center { top: 50%; left: 50%; transform: translate(-50%, -50%); }

.player-info-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.player-info-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bg-glass);
    border: 1.5px solid transparent;
    transition: all 0.3s;
}

.player-info-chip.active {
    border-color: currentColor;
    background: var(--bg-glass-strong);
    box-shadow: 0 0 12px rgba(255,255,255,0.05);
}

.player-info-chip .chip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
}

.player-info-chip .chip-home {
    font-size: 0.7rem;
    opacity: 0.6;
}

.game-message {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(26, 28, 58, 0.92), rgba(45, 53, 97, 0.92));
    backdrop-filter: blur(12px);
    padding: 20px 40px;
    border-radius: var(--radius);
    font-size: 1.2rem;
    font-weight: 700;
    z-index: 100;
    animation: msg-pop 0.3s ease-out;
    text-align: center;
    border: 1.5px solid var(--border-glass);
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

@keyframes msg-pop {
    0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* === Game Over Screen === */
.gameover-content {
    text-align: center;
    padding: 20px;
}

.trophy {
    font-size: 80px;
    animation: trophy-bounce 1s ease-out;
    filter: drop-shadow(0 8px 25px rgba(255, 215, 0, 0.4));
}

@keyframes trophy-bounce {
    0%   { transform: scale(0) rotate(-10deg); }
    60%  { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}

.gameover-content h2 {
    font-size: 2.2rem;
    margin: 10px 0 16px;
    font-weight: 800;
    background: linear-gradient(135deg, #FFE66D, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.winner-display {
    margin: 16px 0 24px;
}

.winner-plane {
    font-size: 50px;
    animation: plane-fly 2.5s ease-in-out infinite;
}

.winner-display h3 {
    font-size: 1.6rem;
    margin: 8px 0 4px;
}

.rankings {
    margin-bottom: 24px;
}

.rank-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px 20px;
    margin: 8px auto;
    max-width: 280px;
    background: var(--bg-glass-card);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

.rank-position {
    font-size: 1.4rem;
    font-weight: 700;
    width: 36px;
}

.rank-color {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.rank-name {
    flex: 1;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.gameover-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

/* === Settings Screen === */
.settings-content {
    padding: 20px;
    width: 100%;
    max-width: 460px;
    max-height: 100vh;
    overflow-y: auto;
}

.settings-content h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 800;
}

.settings-group {
    background: var(--bg-glass-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--border-glass);
}

.settings-group h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.setting-item:last-child {
    border-bottom: none;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 110px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    cursor: pointer;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    cursor: pointer;
    border: none;
}

.language-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.lang-btn {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    border-color: var(--accent);
    background: rgba(255, 126, 95, 0.12);
}

.about-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

#btn-settings-back {
    display: block;
    margin: 0 auto;
}

/* === Toast === */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, rgba(45, 53, 97, 0.95), rgba(26, 28, 58, 0.95));
    backdrop-filter: blur(12px);
    color: var(--text-primary);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 200;
    border: 1px solid var(--border-glass);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* === Responsive === */
@media (max-width: 480px) {
    .home-header h1 {
        font-size: 2rem;
    }
    .plane-logo {
        font-size: 70px;
    }
    .btn-large {
        padding: 14px 36px;
        font-size: 1.05rem;
    }
    .lobby-players {
        gap: 8px;
    }
    .player-slot {
        padding: 14px;
        min-height: 100px;
    }
    .game-board-container {
        padding: 4px;
    }
}

@media (min-width: 768px) {
    .game-board-container {
        padding: 20px;
    }
}
