/* ================================================================ */
/*  LS TETRIS — STYLE.CSS                                           */
/*  Tema Dark Neon · Glassmorphism · Design Profissional            */
/*  v2.1 — Corrigido e completo                                     */
/* ================================================================ */

/* ---------------------------------------------------------------- */
/*  VARIÁVEIS CSS (Tema Padrão — Dark Neon Cyan)                    */
/* ---------------------------------------------------------------- */
:root {
    /* Cores base */
    --bg-primary: #0a0a1a;
    --bg-secondary: #0f0f2a;
    --bg-tertiary: #151535;
    --surface-glass: rgba(255, 255, 255, 0.04);
    --surface-glass-hover: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.08);

    /* Cores do tema (ajustáveis via JS) */
    --theme-hue: 190;
    --theme-sat: 100%;
    --theme-light: 50%;
    --theme-color: hsl(var(--theme-hue), var(--theme-sat), var(--theme-light));
    --theme-glow: hsla(var(--theme-hue), var(--theme-sat), var(--theme-light), 0.3);
    --theme-glow-strong: hsla(var(--theme-hue), var(--theme-sat), var(--theme-light), 0.5);

    /* Cores do board (tetrominos) */
    --color-cyan: #00f0f0;
    --color-yellow: #f0f000;
    --color-purple: #a000f0;
    --color-green: #00f000;
    --color-red: #f00000;
    --color-blue: #0000f0;
    --color-orange: #f0a000;

    /* Tipografia */
    --font-display: 'Orbitron', monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Texto */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* Espaçamentos */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transições */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 150ms var(--ease-smooth);
    --transition-base: 250ms var(--ease-smooth);
    --transition-slow: 400ms var(--ease-smooth);

    /* Dimensões do tabuleiro */
    --board-cols: 10;
    --board-rows: 20;
    --block-size: 30px;
    --board-width: calc(var(--block-size) * var(--board-cols));  /* 300px */
    --board-height: calc(var(--block-size) * var(--board-rows)); /* 600px */

    /* Z-index */
    --z-particles: 0;
    --z-content: 10;
    --z-overlay: 50;
    --z-modal: 100;
    --z-footer: 20;
}

/* ---------------------------------------------------------------- */
/*  TEMA CLARO                                                      */
/* ---------------------------------------------------------------- */
.theme-light {
    --bg-primary: #f0f4ff;
    --bg-secondary: #e8edf8;
    --bg-tertiary: #dce3f0;
    --surface-glass: rgba(0, 0, 0, 0.04);
    --surface-glass-hover: rgba(0, 0, 0, 0.08);
    --border-glass: rgba(0, 0, 0, 0.08);
    --text-primary: #0a0a1a;
    --text-secondary: rgba(0, 0, 0, 0.6);
    --text-muted: rgba(0, 0, 0, 0.35);
}

/* ---------------------------------------------------------------- */
/*  RESET & BASE                                                    */
/* ---------------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    transition: background var(--transition-base), color var(--transition-base);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
}

canvas {
    display: block;
}

kbd {
    background: var(--surface-glass);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: var(--font-display);
    font-size: 0.75rem;
}

.hidden { display: none !important; }

/* ---------------------------------------------------------------- */
/*  SCREENS                                                         */
/* ---------------------------------------------------------------- */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s var(--ease-smooth), visibility 0.5s var(--ease-smooth);
    z-index: 1;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

.screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ---------------------------------------------------------------- */
/*  TELA DE MENU                                                    */
/* ---------------------------------------------------------------- */
#menu-screen {
    background: var(--bg-primary);
    overflow: hidden;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-particles);
    pointer-events: none;
}

.menu-content {
    position: relative;
    z-index: var(--z-content);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 24px;
    animation: fadeInUp 0.8s var(--ease-smooth) both;
}

/* Logo */
.logo-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.logo-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--theme-glow) 0%, transparent 70%);
    animation: pulseGlow 3s ease-in-out infinite;
    pointer-events: none;
}

.logo-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 8px;
    line-height: 1;
    position: relative;
    text-shadow: 0 0 40px var(--theme-glow), 0 0 80px var(--theme-glow);
}

.logo-l { color: var(--theme-color); }
.logo-s { color: var(--theme-color); opacity: 0.7; }
.logo-tetris {
    display: block;
    font-size: 1.8rem;
    letter-spacing: 16px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: -4px;
}

.logo-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 4px;
}

.version-badge {
    position: absolute;
    bottom: -24px;
    right: -40px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--surface-glass);
}

/* ---------------------------------------------------------------- */
/*  BOTÕES                                                          */
/* ---------------------------------------------------------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 48px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.35);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 100%);
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 40px rgba(16, 185, 129, 0.5);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--theme-color);
    background: var(--surface-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--surface-glass-hover);
    box-shadow: 0 0 20px var(--theme-glow);
    border-color: var(--theme-color);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--surface-glass);
}

.btn-block { width: 100%; }

.btn-cancel { opacity: 0.6; }
.btn-cancel:hover { opacity: 1; }

/* Botão de ícone */
.btn-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    color: var(--theme-color);
    background: var(--surface-glass);
    box-shadow: 0 0 24px var(--theme-glow);
}

.btn-icon-sm {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
    margin-top: auto;
}

.btn-icon-sm:hover {
    color: var(--theme-color);
    background: var(--surface-glass);
}

/* Botão de ação (pause/exit) */
.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    background: var(--surface-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-action:hover {
    color: var(--theme-color);
    border-color: var(--theme-color);
    background: var(--surface-glass-hover);
}

.btn-action-danger:hover {
    color: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
}

/* Botão especial de jogar no menu */
.btn-play {
    font-size: 1.3rem;
    padding: 18px 64px;
    border-radius: var(--radius-xl);
    letter-spacing: 4px;
}

/* ---------------------------------------------------------------- */
/*  TELA DO JOGO — LAYOUT                                           */
/* ---------------------------------------------------------------- */
#game-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 16px;
    overflow-y: auto;
}

.game-layout {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
}

/* Painéis laterais */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 140px;
}

.left-panel .panel-card {
    padding: 12px 16px;
}

.right-panel .panel-card {
    padding: 12px 16px;
}

.panel-card {
    background: var(--surface-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color var(--transition-fast);
}

.panel-card:hover {
    border-color: var(--theme-glow);
}

.panel-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.panel-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 12px var(--theme-glow);
}

.panel-highlight {
    color: var(--theme-color);
}

.panel-mono {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.panel-card-next,
.panel-card-hold {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.panel-card-next canvas,
.panel-card-hold canvas {
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.3);
    margin-top: 6px;
}

.game-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

/* ---------------------------------------------------------------- */
/*  TABULEIRO                                                       */
/* ---------------------------------------------------------------- */
.board-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.board-container {
    position: relative;
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.4),
        inset 0 0 30px rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

#game-canvas {
    display: block;
    width: var(--board-width);
    height: var(--board-height);
    image-rendering: pixelated;
}

/* Overlays do tabuleiro */
.board-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: var(--z-overlay);
    animation: fadeIn 0.3s var(--ease-smooth) both;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 24px;
}

.overlay-icon {
    font-size: 3.5rem;
    color: var(--theme-color);
    filter: drop-shadow(0 0 20px var(--theme-glow));
    animation: pulseGlow 2s ease-in-out infinite;
}

.gameover-icon {
    color: #f59e0b;
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.5));
}

.overlay-content h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 4px;
    color: var(--text-primary);
}

.overlay-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---------------------------------------------------------------- */
/*  CONTROLES MÓVEIS                                                */
/* ---------------------------------------------------------------- */
.mobile-controls {
    display: none;
    width: 100%;
    max-width: 400px;
    padding: 12px 16px 8px;
    gap: 8px;
}

.mobile-controls-label {
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.touch-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 8px;
    align-items: center;
}

.touch-dpad {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    justify-items: center;
}

.touch-btn {
    width: 56px;
    height: 56px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-secondary);
    background: var(--surface-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all var(--transition-fast);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    cursor: pointer;
}

.touch-btn:active {
    transform: scale(0.9);
    background: var(--surface-glass-hover);
    border-color: var(--theme-color);
    color: var(--theme-color);
}

.touch-btn-rotate { background: rgba(124, 58, 237, 0.15); }
.touch-btn-rotate:active { background: rgba(124, 58, 237, 0.3); color: #a78bfa; }

.touch-btn-drop {
    background: rgba(239, 68, 68, 0.15) !important;
}
.touch-btn-drop:active {
    background: rgba(239, 68, 68, 0.35) !important;
    color: #fca5a5 !important;
}

.touch-btn-hold {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    background: rgba(16, 185, 129, 0.12);
}

.touch-btn-hold:active {
    background: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.touch-btn-pause {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    margin: 0 auto;
}

.mobile-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

/* ---------------------------------------------------------------- */
/*  MODAIS                                                          */
/* ---------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    animation: fadeIn 0.25s var(--ease-smooth) both;
    padding: 16px;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--theme-glow);
    animation: scaleIn 0.3s var(--ease-smooth) both;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 4px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-close-x {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.modal-close-x:hover {
    color: var(--text-primary);
    background: var(--surface-glass);
}

/* ---------------------------------------------------------------- */
/*  CONFIGURAÇÕES                                                   */
/* ---------------------------------------------------------------- */
.modal-settings {
    max-width: 440px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 16px 0;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.setting-row:hover {
    background: var(--surface-glass);
}

.setting-row span {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-row span i {
    font-size: 1rem;
    color: var(--theme-color);
    width: 20px;
    text-align: center;
}

/* Toggle switch */
.toggle-input { display: none; }

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    border-radius: 99px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toggle-input:checked + .toggle-slider {
    background: var(--theme-color);
    border-color: var(--theme-color);
    box-shadow: 0 0 12px var(--theme-glow);
}

.toggle-input:checked + .toggle-slider::after {
    left: 22px;
    background: #fff;
}

/* Volume slider */
.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 4px;
    border-radius: 2px;
    background: var(--bg-tertiary);
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--theme-color);
    box-shadow: 0 0 8px var(--theme-glow);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--theme-color);
    box-shadow: 0 0 8px var(--theme-glow);
    cursor: pointer;
    border: none;
}

/* Color options */
.color-options {
    display: flex;
    gap: 8px;
}

.color-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--btn-color);
    border: 2px solid transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.color-btn:hover {
    transform: scale(1.15);
}

.color-btn.active {
    border-color: #fff;
    box-shadow: 0 0 12px var(--btn-color);
}

.settings-footer {
    margin-top: 8px;
}

/* ---------------------------------------------------------------- */
/*  FOOTER                                                          */
/* ---------------------------------------------------------------- */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-footer);
    background: linear-gradient(180deg, transparent, rgba(10, 10, 26, 0.98));
    padding: 12px 20px 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-glass);
    transition: background var(--transition-base);
    display: flex;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
    width: 100%;
}

/* Copyright */
.footer-copyright {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.copyright-text {
    background: linear-gradient(90deg, var(--text-muted), var(--theme-color), var(--text-muted));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 6s linear infinite;
}

/* Redes sociais */
.footer-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
    position: relative;
}

.social-link::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-glass);
}

.social-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.social-link:hover {
    color: var(--theme-color);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 0 20px var(--theme-glow);
    background: var(--surface-glass);
}

.social-link:nth-child(1):hover { color: #ff0000; box-shadow: 0 0 20px rgba(255, 0, 0, 0.3); }
.social-link:nth-child(2):hover { color: #e4405f; box-shadow: 0 0 20px rgba(228, 64, 95, 0.3); }
.social-link:nth-child(3):hover { color: #5865f2; box-shadow: 0 0 20px rgba(88, 101, 242, 0.3); }
.social-link:nth-child(4):hover { color: #f0f6fc; box-shadow: 0 0 20px rgba(240, 246, 252, 0.15); }
.social-link:nth-child(5):hover { color: #ffffff; box-shadow: 0 0 20px rgba(255, 255, 255, 0.15); }

/* Botões especiais do footer */
.footer-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 99px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.footer-btn-support {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 2px 16px rgba(37, 99, 235, 0.3);
}

.footer-btn-support:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(37, 99, 235, 0.5);
}

.footer-btn-portfolio {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    box-shadow: 0 2px 16px rgba(124, 58, 237, 0.3);
}

.footer-btn-portfolio:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(124, 58, 237, 0.5);
}

.footer-btn i {
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------- */
/*  KEYFRAMES — ANIMAÇÕES                                           */
/* ---------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes shimmerText {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------- */
/*  RESPONSIVIDADE                                                   */
/* ---------------------------------------------------------------- */

/* Tablets e telas médias */
@media (max-width: 900px) {
    .game-layout {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .side-panel {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        min-width: unset;
        width: 100%;
        max-width: var(--board-width);
        justify-content: center;
    }

    .left-panel .panel-card,
    .right-panel .panel-card {
        flex: 1;
        min-width: 70px;
        padding: 8px 12px;
        text-align: center;
    }

    .left-panel { order: 2; }
    .board-wrapper { order: 1; }
    .right-panel { order: 3; }

    .panel-value { font-size: 1.1rem; }

    .panel-card-next,
    .panel-card-hold { display: none; }

    .game-actions { flex-direction: row; }

    .btn-action {
        padding: 8px 14px;
        font-size: 0.6rem;
    }

    .btn-icon-sm { display: none; }

    .mobile-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .site-footer {
        position: relative;
        margin-top: 12px;
    }
}

/* Smartphones */
@media (max-width: 520px) {
    :root {
        --block-size: 26px;
    }

    #game-screen {
        padding: 8px;
        justify-content: flex-start;
        padding-top: 8px;
    }

    .game-layout { gap: 8px; }
    .side-panel { gap: 6px; }

    .left-panel .panel-card {
        padding: 6px 10px;
        min-width: 55px;
    }

    .panel-label {
        font-size: 0.5rem;
        letter-spacing: 1px;
    }

    .panel-value { font-size: 0.95rem; }

    .logo-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    .logo-tetris {
        font-size: 1.2rem;
        letter-spacing: 10px;
    }

    .btn-play {
        font-size: 1rem;
        padding: 14px 40px;
    }

    .mobile-controls { padding: 6px 8px; }

    .touch-btn {
        width: 48px;
        height: 48px;
        min-width: 42px;
        min-height: 42px;
        font-size: 1.2rem;
    }

    .touch-btn-hold {
        width: 42px;
        height: 42px;
    }

    .touch-btn-pause {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .site-footer {
        padding: 8px 12px 6px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .footer-copyright { font-size: 0.6rem; }
    .footer-socials { gap: 6px; }

    .social-link {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .footer-actions {
        gap: 6px;
        justify-content: center;
    }

    .footer-btn {
        font-size: 0.65rem;
        padding: 6px 12px;
    }

    .modal-card {
        padding: 24px 20px;
    }
}

@media (max-width: 380px) {
    :root {
        --block-size: 22px;
    }

    .left-panel .panel-card {
        min-width: 45px;
        padding: 4px 8px;
    }

    .panel-value { font-size: 0.8rem; }
}

/* Suporte para landscape em mobile */
@media (max-height: 500px) and (orientation: landscape) {
    :root {
        --block-size: 24px;
    }

    #game-screen { padding: 4px; }
    .game-layout { flex-direction: row; flex-wrap: wrap; gap: 6px; }

    .side-panel {
        flex-direction: column;
        min-width: 90px;
        gap: 4px;
    }

    .left-panel { order: 1; }
    .board-wrapper { order: 2; }
    .right-panel { order: 3; }

    .left-panel .panel-card {
        padding: 4px 8px;
        min-width: unset;
    }

    .panel-value { font-size: 0.8rem; }
    .mobile-controls { display: none !important; }
}
