/* ==========================================================================
   FLAPPY WYZUK - GLASSMORPHISM & NEON UI COMPONENTS
   ========================================================================== */

/* Glass Panels */
.glass-panel {
    background: rgba(18, 24, 43, 0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.04) 35%, transparent 50%);
    pointer-events: none;
    transform: rotate(25deg);
}

/* Modals */
.ui-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-normal);
    padding: 16px;
}

.ui-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 15, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-modal-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    background: rgba(14, 18, 34, 0.85);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--border-glass-bright);
    border-radius: var(--border-radius-xl);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 242, 254, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.92) translateY(20px);
    transition: transform var(--transition-smooth);
    z-index: 2;
}

.ui-modal.active .glass-modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
}

.modal-title-group {
    display: flex;
    flex-direction: column;
}

.modal-subtitle {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--neon-cyan);
    font-family: var(--font-display);
}

.modal-title {
    font-size: 1.45rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: #ffffff;
}

.modal-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-glass);
    background: rgba(10, 14, 28, 0.5);
    gap: 12px;
}

/* Modal Content Scroll Areas */
.bird-selection-body,
.themes-selection-body,
.stats-body,
.settings-body,
.credits-body {
    padding: 20px 24px;
    overflow-y: auto;
    max-height: calc(88vh - 160px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Custom Scrollbar */
.bird-selection-body::-webkit-scrollbar,
.themes-selection-body::-webkit-scrollbar,
.stats-body::-webkit-scrollbar,
.settings-body::-webkit-scrollbar,
.credits-body::-webkit-scrollbar {
    width: 6px;
}

.bird-selection-body::-webkit-scrollbar-thumb,
.themes-selection-body::-webkit-scrollbar-thumb,
.stats-body::-webkit-scrollbar-thumb,
.settings-body::-webkit-scrollbar-thumb,
.credits-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-full);
}

/* Buttons Design System */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    border: none;
    outline: none;
    text-decoration: none;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.btn-large {
    padding: 16px 28px;
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: var(--border-radius-sm);
}

.btn-primary {
    background: var(--grad-primary);
    color: #050811;
    box-shadow: 0 8px 24px rgba(0, 242, 254, 0.35);
    font-weight: 800;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 242, 254, 0.5);
    filter: brightness(1.1);
}

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

.btn-glass {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-glass-bright);
    transform: translateY(-2px);
    color: var(--neon-cyan);
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    animation: btnGlowShine 4s infinite ease-in-out;
}

.glass-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.glass-btn-icon:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--neon-pink);
    transform: rotate(90deg);
}

.glass-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.glass-pill-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 242, 254, 0.25);
}

.btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-icon-tiny {
    width: 14px;
    height: 14px;
}

.github-icon-svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Grids for Selection */
.birds-grid, .themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.bird-card-item, .theme-card-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.bird-card-item:hover, .theme-card-item:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.bird-card-item.selected, .theme-card-item.selected {
    background: rgba(0, 242, 254, 0.12);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.35), inset 0 0 12px rgba(0, 242, 254, 0.15);
}

.bird-card-preview {
    width: 68px;
    height: 54px;
}

.theme-card-preview {
    width: 100%;
    height: 60px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bird-card-name, .theme-card-name {
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: #ffffff;
    text-align: center;
}

.selected-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--neon-cyan);
    color: #050811;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}

/* Statistics Screen */
.stats-hero-banner {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(137, 44, 220, 0.15) 100%);
    border-color: var(--border-neon-cyan);
}

.trophy-icon {
    width: 48px;
    height: 48px;
    color: var(--neon-gold);
    filter: drop-shadow(0 0 16px rgba(255, 190, 11, 0.6));
}

.stat-banner-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-display);
}

.stat-banner-value {
    font-size: 2.8rem;
    font-weight: 900;
    font-family: var(--font-display);
    line-height: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-card-title {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.stat-card-num {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: #ffffff;
}

.stat-card-badge {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--neon-cyan);
    font-family: var(--font-display);
}

/* Settings Form Controls */
.setting-group {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.setting-group-title {
    font-size: 0.82rem;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: var(--neon-cyan);
    font-family: var(--font-display);
    text-transform: uppercase;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.setting-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.setting-label span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.setting-label small {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
}

/* Neon Switch */
.toggle-switch {
    appearance: none;
    -webkit-appearance: none;
    width: 46px;
    height: 26px;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.12);
    position: relative;
    cursor: pointer;
    outline: none;
    border: 1px solid var(--border-glass);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.toggle-switch:checked {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 16px var(--neon-cyan-glow);
}

.toggle-switch:checked::before {
    transform: translateX(20px);
    background: #050811;
}

/* Range Slider */
.range-slider-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.neon-slider {
    appearance: none;
    -webkit-appearance: none;
    width: 120px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

.neon-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--neon-cyan);
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.slider-val {
    font-size: 0.8rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--neon-cyan);
    width: 36px;
}

.neon-select {
    background: rgba(14, 18, 34, 0.9);
    color: #ffffff;
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: 6px 12px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.control-key-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-key-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
}

.control-key-item kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-family: monospace;
    color: #ffffff;
    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
}

.badge-tag {
    background: rgba(0, 242, 254, 0.2);
    color: var(--neon-cyan);
    border: 1px solid var(--border-neon-cyan);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
}

/* Credits Modal Specifics */
.creator-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.creator-avatar-glow {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--grad-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 28px rgba(0, 242, 254, 0.5);
    flex-shrink: 0;
}

.creator-initial {
    font-size: 2rem;
    font-weight: 900;
    font-family: var(--font-display);
    color: #050811;
}

.creator-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.credit-role {
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: var(--neon-cyan);
    font-family: var(--font-display);
}

.creator-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
}

.creator-bio {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.4;
}

.creator-links {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.tech-stack-section {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tech-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-display);
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-full);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-family: var(--font-display);
    color: rgba(255, 255, 255, 0.85);
}

/* Pause & Game Over Screen Cards */
.pause-card, .game-over-card {
    padding: 28px;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    border-radius: var(--border-radius-xl);
}

.pause-header, .game-over-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pause-tag, .game-over-tag {
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 800;
    color: var(--neon-cyan);
    font-family: var(--font-display);
}

.pause-title, .game-over-title {
    font-size: 1.8rem;
    font-weight: 900;
    font-family: var(--font-display);
    color: #ffffff;
}

.pause-score-summary, .game-over-scoreboard {
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pause-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px;
}

.pause-lbl, .score-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.55);
    font-family: var(--font-display);
}

.pause-val {
    font-size: 1.6rem;
    font-weight: 900;
    font-family: var(--font-display);
    color: #ffffff;
}

.score-num-huge {
    font-size: 4rem;
    font-weight: 900;
    font-family: var(--font-display);
    line-height: 1;
}

.score-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-glass);
}

.score-meta-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.meta-lbl {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-display);
}

.meta-val {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: #ffffff;
}

.medal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    font-family: var(--font-display);
    border: 1px solid;
}

.medal-bronze {
    background: rgba(205, 127, 50, 0.15);
    border-color: #cd7f32;
    color: #ff9d5c;
}

.medal-silver {
    background: rgba(192, 192, 192, 0.15);
    border-color: #c0c0c0;
    color: #e0e0e0;
}

.medal-gold {
    background: rgba(255, 190, 11, 0.15);
    border-color: #ffbe0b;
    color: #ffd152;
}

.medal-diamond {
    background: rgba(0, 242, 254, 0.2);
    border-color: #00f2fe;
    color: #00f2fe;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.4);
}

.new-best-ribbon {
    background: var(--grad-gold);
    color: #050811;
    font-size: 0.75rem;
    font-weight: 900;
    font-family: var(--font-display);
    letter-spacing: 1.5px;
    padding: 6px 20px;
    border-radius: var(--border-radius-full);
    box-shadow: 0 0 20px rgba(255, 190, 11, 0.6);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pause-actions, .game-over-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-over-sub-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.game-over-footer, .pause-footer-credits {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-display);
}

.footer-repo-link, .link-subtle {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast);
}

.footer-repo-link:hover, .link-subtle:hover {
    color: var(--neon-cyan);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    pointer-events: none;
}

.toast {
    background: rgba(14, 18, 34, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-neon-cyan);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 254, 0.3);
    padding: 10px 20px;
    border-radius: var(--border-radius-full);
    color: #ffffff;
    font-size: 0.85rem;
    font-family: var(--font-display);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease forwards;
}
