/* -------------------------------------------------------------
   Infinity Dopamina - Core Design System & CSS
   ------------------------------------------------------------- */

/* Custom Reset & Variables */
:root {
    --bg-dark: #07080e;
    --bg-card: rgba(20, 22, 39, 0.65);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 242, 254, 0.15);
    
    --neon-cyan: #00f2fe;
    --neon-pink: #ff007f;
    --neon-purple: #9d4edd;
    --neon-gold: #ffd700;
    
    --text-primary: #ffffff;
    --text-secondary: #a2a8c3;
    --text-muted: #5e6486;
    
    --font-primary: 'Outfit', sans-serif;
    --font-mono: 'Space Grotesk', sans-serif;
    
    --shadow-glow-cyan: 0 0 15px rgba(0, 242, 254, 0.4);
    --shadow-glow-pink: 0 0 15px rgba(255, 0, 127, 0.4);
    --shadow-glow-purple: 0 0 15px rgba(157, 78, 221, 0.4);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Particle Backdrop */
#particle-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #111322 0%, #07080e 100%);
    overflow: hidden;
}

#particle-backdrop::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0),
        radial-gradient(rgba(255, 255, 255, 0.03) 2px, transparent 0);
    background-size: 80px 80px, 150px 150px;
    background-position: 0 0, 40px 40px;
    animation: slow-pan 120s linear infinite;
}

@keyframes slow-pan {
    from { transform: translate(0, 0); }
    to { transform: translate(150px, 150px); }
}

/* Glassmorphism Preset Utilities */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(7, 8, 14, 0.8);
}
::-webkit-scrollbar-thumb {
    background: #252844;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
    box-shadow: var(--shadow-glow-cyan);
}

/* Layout Core Wrapper */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* App Header HUD styling */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2.25rem;
    color: var(--neon-cyan);
    text-shadow: var(--shadow-glow-cyan);
}

.logo-text h1 {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.logo-text h1 span {
    color: var(--neon-pink);
    text-shadow: var(--shadow-glow-pink);
}

.logo-text .tagline {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-hud-items {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* DC Balance Counter */
.dc-balance-hud {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    background: rgba(0, 242, 254, 0.05);
    border: 1px solid rgba(0, 242, 254, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 242, 254, 0.05);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dc-balance-hud.tick {
    transform: scale(1.1);
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-glow-cyan);
}

.coin-glow-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px #ffd700);
}

.dc-coin-svg {
    width: 100%;
    height: 100%;
}

.dc-amount-wrapper {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--neon-cyan);
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
}

.dc-suffix {
    font-size: 0.8rem;
    color: var(--neon-pink);
    font-weight: 600;
}

/* User Profile HUD */
.user-profile-hud {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-glass);
}

.user-profile-hud:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 0, 127, 0.3);
    box-shadow: 0 0 12px rgba(255, 0, 127, 0.15);
}

.avatar-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.1rem;
    box-shadow: 0 0 8px rgba(157, 78, 221, 0.5);
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.player-nickname {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-id {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.edit-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
    transition: color 0.2s;
}

.user-profile-hud:hover .edit-icon {
    color: var(--neon-pink);
}

/* Main Workspace Grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
    flex-grow: 1;
}

.left-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Welcome Banner */
.welcome-banner {
    padding: 1.5rem 2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(20, 22, 39, 0.8) 0%, rgba(30, 20, 45, 0.4) 100%);
    border-left: 4px solid var(--neon-purple);
}

.welcome-banner h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.welcome-banner p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

.welcome-banner strong {
    color: var(--neon-cyan);
}

/* Section Title Styling */
.section-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.section-title-wrapper h3 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title-wrapper h3 i {
    color: var(--neon-purple);
}

.section-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Mini-Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Game Card Design */
.game-card {
    border-radius: 16px;
    overflow: hidden;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
}

.game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1.5px;
    background: linear-gradient(135deg, transparent 60%, rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-4px);
    background: rgba(26, 29, 51, 0.8);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Individual Game Card Highlights */
.game-card[data-game="bubble-wrap"]:hover {
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.1), var(--shadow-glass);
}
.game-card[data-game="fidget-spinner"]:hover {
    border-color: rgba(157, 78, 221, 0.3);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.1), var(--shadow-glass);
}
.game-card[data-game="perfect-circle"]:hover {
    border-color: rgba(255, 0, 127, 0.3);
    box-shadow: 0 0 20px rgba(255, 0, 127, 0.1), var(--shadow-glass);
}
.game-card[data-game="hydraulic-press"]:hover {
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1), var(--shadow-glass);
}

.game-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
}

.popper-icon { color: var(--neon-cyan); text-shadow: var(--shadow-glow-cyan); background: rgba(0, 242, 254, 0.1); }
.spinner-icon { color: var(--neon-purple); text-shadow: var(--shadow-glow-purple); background: rgba(157, 78, 221, 0.1); }
.circle-icon { color: var(--neon-pink); text-shadow: var(--shadow-glow-pink); background: rgba(255, 0, 127, 0.1); }
.press-icon { color: var(--neon-gold); text-shadow: 0 0 8px rgba(255, 215, 0, 0.4); background: rgba(255, 215, 0, 0.1); }

.game-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.game-card-content h4 {
    font-size: 1.15rem;
    font-weight: 600;
}

.game-card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    flex-grow: 1;
}

.game-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    gap: 0.5rem;
}

.reward-tag {
    font-size: 0.75rem;
    color: var(--neon-cyan);
    font-weight: 600;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.game-card[data-game="hydraulic-press"] .reward-tag {
    color: var(--neon-gold);
}

.btn-play {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.game-card:hover .btn-play {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.game-card[data-game="perfect-circle"]:hover .btn-play {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.3);
}

.game-card[data-game="hydraulic-press"]:hover .btn-play {
    background: linear-gradient(135deg, var(--neon-gold), #ff8800);
    color: #3d2300;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Upgrade Cards Row */
.upgrades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.upgrade-card {
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.upgrade-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.upgrade-info h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upgrade-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.upgrade-stat {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--neon-cyan);
    margin-top: 0.25rem;
}

.btn-buy {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    transition: all 0.2s;
}

.btn-buy:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    border-color: transparent;
    box-shadow: var(--shadow-glow-purple);
}

.btn-buy:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.price-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.btn-buy:hover .price-label {
    color: var(--text-primary);
}

.price-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--neon-gold);
    display: flex;
    align-items: center;
    gap: 0.15rem;
    font-family: var(--font-mono);
}

.btn-buy:hover .price-value {
    color: #fff;
}

/* Sidebar Leaderboard Panel */
.leaderboard-panel {
    border-radius: 16px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-height: 800px;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.leaderboard-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-gold {
    color: var(--neon-gold);
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
}

.leaderboard-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 0.25rem;
}

.leaderboard-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 2rem 0;
}

/* Individual Leaderboard Row */
.rank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s;
}

.rank-row.self {
    background: rgba(0, 242, 254, 0.05);
    border: 1px solid rgba(0, 242, 254, 0.25);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.08);
}

.rank-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0; /* allows text truncation */
}

.rank-number {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
}

.rank-row:nth-child(1) .rank-number { background: #ffd700; color: #3d2300; box-shadow: 0 0 8px #ffd700; }
.rank-row:nth-child(2) .rank-number { background: #c0c0c0; color: #222; box-shadow: 0 0 8px #c0c0c0; }
.rank-row:nth-child(3) .rank-number { background: #cd7f32; color: #fff; box-shadow: 0 0 8px #cd7f32; }

.rank-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.rank-row.self .rank-name {
    color: var(--neon-cyan);
}

.rank-score {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--neon-gold);
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.rank-score i {
    font-size: 0.75rem;
}

/* Modals System styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 6, 12, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-window {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-window {
    transform: translateY(0) scale(1);
}

.game-modal-window {
    max-width: 900px;
    height: 80vh;
    max-height: 750px;
}

.profile-modal-window {
    max-width: 480px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-badge {
    background: rgba(157, 78, 221, 0.2);
    border: 1px solid var(--neon-purple);
    color: #e2afff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--neon-pink);
}

.modal-body {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 11, 20, 0.4);
}

.game-instruction-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-instruction-text i {
    color: var(--neon-cyan);
}

.session-earn-hud {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--neon-cyan);
    font-size: 0.95rem;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
}

/* Profile Form styling */
.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
}

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(7, 8, 14, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: all 0.2s;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.2);
}

.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-with-icon .form-control {
    padding-left: 2.25rem;
}

.input-with-icon .form-control:focus + i {
    color: var(--neon-pink);
}

.help-text {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.error-banner {
    background: rgba(255, 0, 127, 0.1);
    border: 1px solid rgba(255, 0, 127, 0.3);
    color: #ff85a1;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-banner.hidden {
    display: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow-pink);
    transform: translateY(-1px);
}

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

.btn-icon {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--neon-cyan);
    border-color: rgba(0, 242, 254, 0.3);
}

/* -------------------------------------------------------------
   MINI-GAMES INTERFACE DESIGNS
   ------------------------------------------------------------- */
.game-viewport {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: rgba(5, 6, 11, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

/* Game 1: Bubble Wrap Styling */
.bubble-wrap-arena {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    padding: 1.5rem;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

.bubble {
    aspect-ratio: 1;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    background: radial-gradient(circle at 30% 30%, rgba(0, 242, 254, 0.4) 0%, rgba(0, 100, 200, 0.3) 60%, rgba(0, 30, 80, 0.6) 100%);
    box-shadow: 
        inset 0 3px 6px rgba(255, 255, 255, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.4),
        0 0 10px rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.25);
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bubble:hover {
    transform: scale(1.08);
    background: radial-gradient(circle at 30% 30%, rgba(0, 242, 254, 0.6) 0%, rgba(0, 120, 240, 0.4) 60%, rgba(0, 40, 120, 0.7) 100%);
    box-shadow: 
        inset 0 4px 8px rgba(255, 255, 255, 0.5),
        0 6px 12px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(0, 242, 254, 0.3);
}

.bubble.popped {
    background: rgba(10, 15, 28, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.9),
        0 1px 1px rgba(255, 255, 255, 0.02) !important;
    transform: scale(0.95);
    cursor: default;
}

.bubble.popped::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    border: 1.5px dashed rgba(255, 255, 255, 0.08);
}

/* Popping Float Earning Text Animation */
.floating-dc {
    position: absolute;
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--neon-cyan);
    font-size: 0.9rem;
    pointer-events: none;
    animation: float-up-fade 0.8s forwards ease-out;
    text-shadow: var(--shadow-glow-cyan);
    z-index: 10;
}

@keyframes float-up-fade {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(1.1);
        opacity: 0;
    }
}

/* Game 2: Fidget Spinner Arena */
.spinner-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    height: 100%;
}

.spinner-container {
    width: 380px;
    height: 380px;
    position: relative;
    cursor: grab;
    user-select: none;
}

.spinner-container:active {
    cursor: grabbing;
}

.fidget-spinner-svg {
    width: 100%;
    height: 100%;
    transform-origin: center;
    filter: drop-shadow(0 0 15px rgba(157, 78, 221, 0.4));
}

.spinner-stats-hud {
    display: flex;
    gap: 2rem;
    font-family: var(--font-mono);
}

.stat-glow {
    color: var(--neon-cyan);
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: var(--shadow-glow-cyan);
}

/* Game 3: Perfect Circle Arena */
.circle-arena {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.circle-canvas {
    background: radial-gradient(circle at 50% 50%, rgba(20, 22, 39, 0.8) 0%, rgba(10, 11, 20, 0.95) 100%);
    border: 1px solid rgba(255, 0, 127, 0.15);
    border-radius: 16px;
    cursor: crosshair;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
    max-width: 100%;
}

.circle-score-overlay {
    position: absolute;
    background: rgba(5, 6, 12, 0.85);
    border: 1.5px solid var(--neon-pink);
    border-radius: 16px;
    padding: 1.5rem 2.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 0 25px rgba(255, 0, 127, 0.3);
    z-index: 15;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.circle-score-overlay.visible {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

.circle-accuracy-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.circle-accuracy-val {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--neon-pink);
    text-shadow: var(--shadow-glow-pink);
}

.circle-rating-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.circle-payout-text {
    font-family: var(--font-mono);
    color: var(--neon-gold);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-retry {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.btn-retry:hover {
    background: var(--neon-pink);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-glow-pink);
}

/* Game 4: Hydraulic Press Arena */
.press-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 1.5rem;
    padding: 1rem;
}

.press-game-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    width: 100%;
    height: 100%;
    gap: 1.5rem;
}

.press-item-select {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

.press-item-option {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.press-item-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 215, 0, 0.3);
}

.press-item-option.selected {
    background: rgba(255, 215, 0, 0.08);
    border-color: var(--neon-gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
}

.item-option-emoji {
    font-size: 1.5rem;
}

.item-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    text-align: left;
}

.item-option-name {
    font-size: 0.8rem;
    font-weight: 600;
}

.item-option-cost {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-cyan);
}

.press-visualizer-container {
    background: rgba(5, 6, 12, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
    height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 2rem;
}

/* Hydraulic Press Machine graphics */
.press-machine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.press-top-beam {
    width: 100%;
    height: 30px;
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    border-bottom: 2px solid #555;
    position: absolute;
    top: 0;
}

.press-pillar {
    width: 12px;
    height: 100%;
    background: linear-gradient(90deg, #444 0%, #222 50%, #111 100%);
    position: absolute;
    top: 0;
}

.press-pillar-left { left: 40px; }
.press-pillar-right { right: 40px; }

.press-base {
    width: calc(100% - 40px);
    height: 30px;
    background: linear-gradient(0deg, #333 0%, #151515 100%);
    border-top: 2px solid #444;
    position: absolute;
    bottom: 20px;
    border-radius: 4px;
}

/* The moving piston */
.press-piston-assembly {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.05s linear; /* fast responsiveness for user action */
}

.press-shaft {
    width: 24px;
    height: 200px;
    background: linear-gradient(90deg, #e6e6e6 0%, #8c8c8c 50%, #4c4c4c 100%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.press-head {
    width: 120px;
    height: 25px;
    background: linear-gradient(180deg, #666 0%, #333 100%);
    border-bottom: 3px solid #ffcc00;
    border-top: 1px solid #999;
}

/* Placement slot for crushables */
.press-anvil {
    z-index: 2;
    margin-bottom: 10px;
    position: relative;
    width: 100px;
    height: 80px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.crushable-object {
    font-size: 5.5rem;
    transition: transform 0.05s linear;
    transform-origin: bottom center;
    user-select: none;
    line-height: 1;
}

.press-controls-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.press-lever-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.btn-crush-lever {
    background: radial-gradient(circle at 30% 30%, #ff4d4d 0%, #cc0000 70%, #800000 100%);
    border: 3px solid #ff9999;
    color: white;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
    font-family: var(--font-mono);
    text-transform: uppercase;
    box-shadow: 0 6px 15px rgba(204, 0, 0, 0.5), inset 0 3px 5px rgba(255, 255, 255, 0.5);
    transition: all 0.1s;
    user-select: none;
}

.btn-crush-lever:active {
    transform: scale(0.92) translateY(2px);
    background: radial-gradient(circle at 30% 30%, #cc0000 0%, #990000 70%, #600000 100%);
    box-shadow: 0 2px 5px rgba(204, 0, 0, 0.3), inset 0 1px 3px rgba(0,0,0,0.5);
}

.press-gauge {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-family: var(--font-mono);
    width: 180px;
}

.gauge-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.gauge-track {
    background: rgba(255, 255, 255, 0.05);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
}

.gauge-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
    box-shadow: var(--shadow-glow-pink);
    transition: width 0.05s linear;
}

/* Floating particle sparks */
.particle-spark {
    position: absolute;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    animation: spark-shoot 0.5s forwards ease-out;
}

@keyframes spark-shoot {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx), var(--dy)) scale(0);
        opacity: 0;
    }
}

/* Canvas guide path animation */
.pulse-neon {
    animation: neon-glow-pulse 2s infinite alternate;
}

@keyframes neon-glow-pulse {
    from {
        text-shadow: 0 0 5px rgba(0, 242, 254, 0.2), 0 0 10px rgba(0, 242, 254, 0.2);
    }
    to {
        text-shadow: 0 0 10px rgba(0, 242, 254, 0.6), 0 0 20px rgba(0, 242, 254, 0.4);
    }
}

.animate-spin-pulse {
    animation: spin-pulse-keyframes 4s infinite linear;
}

@keyframes spin-pulse-keyframes {
    0% { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 2px var(--neon-pink)); }
    50% { transform: rotate(180deg) scale(1.1); filter: drop-shadow(0 0 10px var(--neon-pink)); }
    100% { transform: rotate(360deg) scale(1); filter: drop-shadow(0 0 2px var(--neon-pink)); }
}

.rotate-slow {
    animation: spin-clockwise 10s infinite linear;
}

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

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .leaderboard-panel {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 1rem 0.75rem;
    }
    .app-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.25rem 1rem;
    }
    .header-hud-items {
        width: 100%;
        justify-content: center;
    }
    .press-game-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .press-item-select {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .press-item-option {
        flex: 1 1 140px;
    }
    .game-modal-window {
        height: 90vh;
    }
}

/* Standalone Game Page Enhancements */
.header-brand .btn-play {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.header-brand .btn-play:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 0, 127, 0.35);
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.2);
}

.game-panel {
    border-radius: 16px;
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--border-glass);
}
