/* CROWDTALE: ANNAVERSE - Futuristic Dark Theme */

/* Mokoto Font Face - Local files (priority) - Only for specific elements */
@font-face {
    font-family: 'Mokoto';
    src: url('/static/fonts/Mokoto.woff2') format('woff2'),
         url('/static/fonts/Mokoto.woff') format('woff'),
         url('/static/fonts/Mokoto.ttf') format('truetype'),
         url('/static/fonts/Mokoto.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

/* Remove padding and margin from gb-body and gb-blur-text */
.gb-body,
.gb-blur-text {
    padding: 0 !important;
    margin: 0 !important;
}

/* CSS Variables for Theme */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #0f0f0f;
    --bg-panel: rgba(0, 0, 0, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-color: #00d4ff;
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-color: rgba(0, 212, 255, 0.3);
    --white-border: #ffffff;
}

/* Light Theme */
body.light-theme {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-panel: rgba(255, 255, 255, 0.8);
    --text-primary: #1a1a1a;
    --text-secondary: rgba(26, 26, 26, 0.7);
    --accent-color: #0066cc;
    --border-color: rgba(0, 0, 0, 0.2);
    --shadow-color: rgba(0, 102, 204, 0.3);
    --white-border: #333333;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Tomorrow', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

/* Main UI Frame - no border */
.main-ui-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Title Section - alone and centered with border */
.title-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px 30px;
    flex-shrink: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    margin-bottom: 0px;
    background: linear-gradient(135deg, 
        rgba(1, 30, 41, 0.95) 0%, 
        rgba(0, 20, 30, 0.98) 50%,
        rgba(1, 30, 41, 0.95) 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.3),
        inset 0 0 30px rgba(0, 212, 255, 0.1),
        0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.title-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 212, 255, 0.2), 
        transparent);
    animation: shimmer 3s infinite;
}

.title-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid;
    border-image: linear-gradient(135deg, 
        rgba(0, 212, 255, 0.8) 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        rgba(0, 212, 255, 0.8) 100%) 1;
    border-radius: 8px;
    pointer-events: none;
    animation: borderGlow 2s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes borderGlow {
    0% {
        opacity: 0.6;
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.8);
    }
}

.title-section .header-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 
        0 0 10px rgba(0, 212, 255, 0.8),
        0 0 20px rgba(0, 212, 255, 0.6),
        0 0 30px rgba(0, 212, 255, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Mokoto', 'Tomorrow', sans-serif !important;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #00d4ff 50%, 
        #ffffff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 4s ease infinite;
    display: inline-block;
    padding: 0 10px;
}

@keyframes textGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.title-section:hover .header-title {
    transform: scale(1.02);
    text-shadow: 
        0 0 15px rgba(0, 212, 255, 1),
        0 0 25px rgba(0, 212, 255, 0.8),
        0 0 35px rgba(0, 212, 255, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.5);
}

.title-section:hover {
    box-shadow: 
        0 0 30px rgba(0, 212, 255, 0.5),
        inset 0 0 40px rgba(0, 212, 255, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Game Content Wrapper - contains header-bottom-row and game-frame */
.game-content-wrapper {
    border: 2px solid rgba(0, 212, 255, 0.6);
    background: #011e29;
    border-radius: 4px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.game-content-wrapper:hover {
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

/* Header bottom row - login button and user info */
.header-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    flex-shrink: 0;
    gap: 15px;
}

.header-bottom-row .header-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}

.btn-toggle-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.btn-toggle-panel:hover {
    background: rgba(0, 212, 255, 0.25);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    transform: scale(1.05);
}

.btn-toggle-panel:active {
    transform: scale(0.95);
}

.btn-toggle-panel i {
    transition: transform 0.3s ease;
}


.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 15px;
}

.player-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.gem-display {
    display: flex;
    align-items: center;
}

.gem-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 10px var(--shadow-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.light-theme .gem-container {
    background: rgba(0, 102, 204, 0.05);
}

.btn-add-gem {
    background: transparent;
    border: 1px solid #d9d9d9;
    color: var(--accent-color);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    font-size: 1rem;
    font-weight: 700;
}

.btn-add-gem:hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 8px var(--shadow-color);
    transform: scale(1.1);
}

body.light-theme .btn-add-gem:hover {
    background: rgba(0, 102, 204, 0.2);
}

.gem-prefix {
    color: var(--accent-color);
    line-height: 1;
    transition: color 0.3s ease;
}

#gem-count {
    color: #d9d9d9;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.gem-icon {
    font-size: 1rem;
    filter: drop-shadow(0 0 5px var(--shadow-color));
    transition: filter 0.3s ease;
}

.btn-header {
    background: var(--white-border);
    border: 1px solid var(--accent-color);
    padding: 8px 20px;
    border-radius: 4px;
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#login-btn {
    background: transparent !important;
    border: 1px solid #ffffff !important;
    font-family: 'Mokoto', 'Tomorrow', sans-serif !important;
    color: #ffffff !important;
    font-weight: bold !important;
}

#logout-btn {
    background: #adb3b5 !important;
    border: none !important;
    font-family: 'Mokoto', 'Tomorrow', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: bold !important;
}

body.light-theme .btn-header {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-header:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--shadow-color);
    transform: translateY(-2px);
}

/* Volume Controls in Settings */
.volume-controls-inline {
    display: none !important;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.volume-btn-inline {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.volume-btn-inline:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    transform: scale(1.05);
}

.volume-icon-inline {
    font-size: 1.5rem;
    color: #ffffff;
    opacity: 0.5;
    transition: all 0.3s ease;
    display: inline-block;
}

.volume-icon-inline::before {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.volume-btn-inline:hover .volume-icon-inline {
    opacity: 1;
    color: #00d4ff;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.8);
}

/* Active volume button state */
.volume-btn-active {
    background: rgba(0, 212, 255, 0.2) !important;
    border-color: #00d4ff !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6) !important;
}

.volume-btn-active .volume-icon-inline {
    opacity: 1 !important;
    color: #00d4ff !important;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.8) !important;
}

.volume-btn-active:hover {
    background: rgba(0, 212, 255, 0.3) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8) !important;
}

/* Old Volume Controls (removed) */
.volume-controls {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    display: flex;
    gap: 8px;
    z-index: 9999;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.volume-controls:hover {
    opacity: 1;
}

.volume-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 212, 255, 0.5);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.volume-btn:hover {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

.volume-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

/* Main Container */
.main-container {
    flex: 1;
    display: flex;
    background: var(--bg-primary);
    overflow: hidden;
    min-height: 0;
}

.main-content-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0;
}

/* Left Panel - Chat/Log */
.left-panel {
    width: 33%;
    min-width: 350px;
    background: var(--bg-secondary);
    border-right: none;
    display: flex;
    flex-direction: column;
    padding: 15px 7.5px 15px 15px;
    overflow: hidden; /* Hidden on desktop - panels handle overflow */
    box-shadow: 2px 0 20px var(--shadow-color);
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.left-panel-hidden {
    width: 0 !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
    opacity: 0;
    pointer-events: none;
    border-right: none !important;
    box-shadow: none !important;
}

/* Mobile: Enable scrolling on left panel and ensure all content is visible */
@media (max-width: 768px) {
    .left-panel {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        height: 50% !important;
        min-height: 50% !important;
        flex-shrink: 0 !important;
    }
    
    /* Ensure all views inside left panel can scroll and show all content */
    .chat-view,
    .user-account-view,
    .settings-view,
    .storefront-items-view,
    .store-bundles-view-left {
        overflow-y: visible !important; /* Let parent handle scrolling */
        overflow-x: hidden !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        flex: 0 0 auto !important; /* Don't flex, use auto height */
    }
    
    /* Ensure storefront items list scrolls properly */
    .storefront-items-view .storefront-items-list {
        overflow-y: visible !important;
        overflow-x: hidden !important;
        max-height: none !important;
        height: auto !important;
        flex: 0 0 auto !important;
    }
    
    .storefront-items-view {
        padding: 15px !important; /* Reduce padding on mobile */
    }
    
    /* Ensure user account content scrolls properly */
    .user-account-view {
        padding: 10px !important;
        gap: 10px !important;
    }
    
    .user-account-view .player-info-section,
    .user-account-view .achievements-section {
        overflow-y: visible !important;
        overflow-x: hidden !important;
        max-height: none !important;
        height: auto !important;
        flex: 0 0 auto !important;
        /* Prevent green color flash */
        border-color: rgba(0, 212, 255, 0.2) !important;
        background: linear-gradient(135deg, rgba(1, 30, 41, 0.4) 0%, rgba(0, 20, 30, 0.5) 100%) !important;
    }
    
    .user-account-view .achievements-list {
        overflow-y: visible !important;
        overflow-x: hidden !important;
        max-height: none !important;
        height: auto !important;
        flex: 0 0 auto !important;
    }
    
    .user-account-view .player-stats {
        max-height: none !important;
    }
    
    /* Ensure storefront items are visible */
    .storefront-items-view {
        padding: 12px !important;
        gap: 12px !important;
    }
    
    .storefront-item {
        flex-shrink: 0 !important;
        min-height: auto !important;
        padding: 15px !important;
        gap: 15px !important;
    }
    
    .storefront-items-list {
        gap: 12px !important;
        padding: 5px 0 !important;
    }
    
    /* Ensure achievement cards are visible */
    .achievement-card {
        flex-shrink: 0 !important;
        min-height: auto !important;
        padding: 12px !important;
        gap: 8px !important;
    }
    
    /* Mobile-specific size adjustments */
    .player-avatar-placeholder {
        width: 100px !important;
        height: 100px !important;
        margin: 0 auto 15px !important;
    }
    
    .avatar-icon {
        font-size: 3rem !important;
    }
    
    .player-info-label {
        font-size: 1.2rem !important;
        margin-bottom: 12px !important;
    }
    
    .achievements-label {
        font-size: 0.85rem !important;
        margin-bottom: 12px !important;
    }
    
    /* Chat messages section - allow full height */
    .chat-messages-section {
        overflow-y: visible !important;
        overflow-x: hidden !important;
        flex: 1 1 auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    .chat-messages {
        overflow-y: visible !important;
        overflow-x: hidden !important;
        max-height: none !important;
    }
    
    /* Panel sections should not restrict height */
    .panel-section {
        flex-shrink: 0;
    }
    
    .signal-stability-section {
        flex-shrink: 0;
    }
    
    .chat-input-section {
        flex-shrink: 0;
    }
    
    .panel-icons-section {
        flex-shrink: 0;
    }
}

/* Dashboard Icon in Icons Section */
/* Dashboard icon styling is now handled by .panel-icon */

/* Panel Sections with borders */
.panel-section {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    background: var(--bg-panel);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Remove borders from panel sections inside chat-view */
.chat-view > .panel-section {
    border: none;
    background: transparent;
}

.panel-icons-section {
    flex-shrink: 0;
    padding: 10px;
    border: 2px solid #ffffff;
    background: #011e29;
    border-radius: 4px;
}

.signal-stability-section {
    flex-shrink: 0;
}

.chat-messages-section {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Mobile: Ensure scrolling works properly */
@media (max-width: 768px) {
    .chat-messages-section {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .chat-view {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .user-account-view {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .settings-view {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .store-bundles-view-left {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    
    /* Ensure storefront-items-view scrolls properly on mobile */
    .storefront-items-view {
        overflow-y: visible !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ensure storefront items list allows full height */
    .storefront-items-list {
        overflow-y: visible !important;
        overflow-x: hidden !important;
        max-height: none !important;
        height: auto !important;
        flex: 0 0 auto !important;
    }
    
    /* Ensure achievements section allows full height */
    .achievements-section {
        flex: 0 0 auto !important;
        min-height: auto !important;
    }
    
    .achievements-list {
        overflow-y: visible !important;
        overflow-x: hidden !important;
        max-height: none !important;
        height: auto !important;
        flex: 0 0 auto !important;
    }
}

.chat-input-section {
    flex-shrink: 0;
}

/* Chat View / User Account View Toggle */
.chat-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 2px solid #ffffff;
    background: #011e29;
    padding: 10px;
    border-radius: 4px;
}

.user-account-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px solid #ffffff;
    background: #011e29;
    border-radius: 4px;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
}

.user-account-view > .panel-section {
    border: none !important;
    background: transparent !important;
}

/* Style rewards-container when inside achievements-list to match panel-section styling */
.achievements-list .rewards-container {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.achievements-list .rewards-header {
    margin-bottom: 15px;
}

.achievements-list .rewards-title {
    color: #ffffff;
    font-size: 0.9rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
    text-align: left;
}

.achievements-list .rewards-content {
    padding: 0;
}

.achievements-list .rewards-section {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 15px;
    box-shadow: none !important;
}

.achievements-list .rewards-section::before,
.achievements-list .rewards-section::after {
    display: none !important;
}

.achievements-list .rewards-section-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.achievements-list .rewards-section-title::after {
    display: none !important;
}

.achievements-list .reward-item {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 10px 0 !important;
    margin-bottom: 8px !important;
    box-shadow: none !important;
}

.achievements-list .reward-item::before,
.achievements-list .reward-item::after {
    display: none !important;
}

.achievements-list .reward-item:hover {
    background: rgba(0, 212, 255, 0.05) !important;
    border-color: rgba(0, 212, 255, 0.2) !important;
    box-shadow: none !important;
}

.achievements-list .reward-name {
    color: #ffffff;
    font-size: 0.9rem !important;
    font-weight: 600;
}

.achievements-list .reward-amount {
    color: #00d4ff;
    font-size: 0.9rem !important;
    font-weight: 600;
}

.achievements-list .reward-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem !important;
    margin-top: 4px;
}

.achievements-list .rewards-message,
.achievements-list .rewards-loading,
.achievements-list .rewards-error {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem !important;
    text-align: center;
    padding: 10px;
}

.achievements-list .rewards-list {
    display: flex;
    flex-direction: column;
}

/* Prevent green color flash from .text-success class or rewards content */
.achievements-section .text-success,
.achievements-list .text-success,
.achievements-section .rewards-content .text-success,
.achievements-list .rewards-content .text-success,
.achievements-section * .text-success,
.achievements-list * .text-success {
    color: #00d4ff !important; /* Use cyan instead of green */
    background-color: transparent !important;
}

/* Ensure achievements-section doesn't get green border/background during loading */
.achievements-section:not(:hover) {
    border-color: rgba(0, 212, 255, 0.2) !important;
    background: linear-gradient(135deg, rgba(1, 30, 41, 0.4) 0%, rgba(0, 20, 30, 0.5) 100%) !important;
}

/* Prevent any green border/background from being applied */
.user-account-view .achievements-section,
.user-account-view .achievements-section:before {
    border-color: rgba(0, 212, 255, 0.2) !important;
    background: linear-gradient(135deg, rgba(1, 30, 41, 0.4) 0%, rgba(0, 20, 30, 0.5) 100%) !important;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(0, 212, 255, 0.05) !important;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.storefront-items-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px solid #ffffff;
    background: #011e29;
    border-radius: 4px;
    padding: 20px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.storefront-items-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.storefront-items-view > .storefront-header,
.storefront-items-view > .storefront-items-list {
    border: none !important;
    background: transparent !important;
    position: relative;
    z-index: 1;
}

/* Store Bundles View in Left Panel */
.store-bundles-view-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 2px solid #ffffff;
    background: #011e29;
    border-radius: 4px;
    padding: 10px;
}

.store-bundles-view-left > .store-bundles-container {
    border: none !important;
    background: transparent !important;
    position: relative;
    z-index: 1;
    padding: 10px;
}


/* Player Information Section */
.player-info-section {
    flex-shrink: 0;
}

.player-info-label {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-align: center;
}

.player-avatar-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border: 2px solid #00d4ff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.avatar-icon {
    font-size: 4rem;
    color: #dceaf2;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.8));
}

.player-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-size: 0.9rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    color: #00d4ff;
    font-weight: 600;
}

/* Achievements Section */
.achievements-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(135deg, rgba(1, 30, 41, 0.4) 0%, rgba(0, 20, 30, 0.5) 100%);
    border-radius: 8px;
    padding: 20px;
    border: 2px solid rgba(0, 212, 255, 0.2);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(0, 212, 255, 0.05);
    overflow: hidden;
}

.achievements-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.achievements-section > * {
    position: relative;
    z-index: 1;
}

.achievements-label {
    color: #00d4ff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 
        0 0 10px rgba(0, 212, 255, 0.6),
        0 0 20px rgba(0, 212, 255, 0.3);
    position: relative;
    padding-bottom: 12px;
}

.achievements-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    flex: 1;
    padding: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
}

.achievements-list::-webkit-scrollbar {
    width: 6px;
}

.achievements-list::-webkit-scrollbar-track {
    background: transparent;
}

.achievements-list::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

.achievements-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

.achievement-card {
    background: linear-gradient(135deg, 
        rgba(50, 76, 105, 0.7) 0%, 
        rgba(40, 60, 85, 0.8) 50%,
        rgba(30, 45, 65, 0.7) 100%);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 20px rgba(0, 212, 255, 0.1);
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 212, 255, 0.8), 
        rgba(255, 255, 255, 0.6),
        rgba(0, 212, 255, 0.8),
        transparent);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    z-index: 1;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

.achievement-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 212, 255, 0.05) 0%, 
        transparent 50%,
        rgba(0, 212, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.achievement-card:hover {
    background: linear-gradient(135deg, 
        rgba(60, 90, 120, 0.85) 0%, 
        rgba(50, 75, 100, 0.9) 50%,
        rgba(40, 60, 85, 0.85) 100%);
    border-color: rgba(0, 212, 255, 0.9);
    box-shadow: 
        0 8px 30px rgba(0, 212, 255, 0.4),
        0 0 0 2px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 40px rgba(0, 212, 255, 0.2);
    transform: translateX(8px) translateY(-4px);
}

.achievement-card:hover::before {
    transform: translateX(100%);
}

.achievement-card:hover::after {
    opacity: 1;
}

.achievement-card > * {
    position: relative;
    z-index: 2;
}

.achievement-name {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.achievement-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Settings View */
.settings-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 2px solid #ffffff;
    background: #011e29;
    border-radius: 4px;
    padding: 10px;
}

.settings-view > .panel-section {
    border: none !important;
    background: transparent !important;
}

.settings-section {
    flex-shrink: 0;
}

.settings-label {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.settings-dropdown {
    width: 100%;
    padding: 12px 40px 12px 15px;
    background: linear-gradient(135deg, rgba(50, 76, 105, 0.6) 0%, rgba(40, 60, 85, 0.7) 100%);
    border: 2px solid rgba(217, 217, 217, 0.3);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: 'Tomorrow', sans-serif;
    cursor: pointer;
    transition: all 0.4s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.light-theme .settings-dropdown {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230066cc' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.settings-dropdown:hover {
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 
        0 4px 15px rgba(0, 212, 255, 0.3),
        0 0 0 1px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(60, 90, 120, 0.7) 0%, rgba(50, 75, 100, 0.8) 100%);
}

.settings-dropdown:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 
        0 4px 15px rgba(0, 212, 255, 0.3),
        0 0 0 1px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Storefront Items View */
.storefront-header {
    padding: 20px 20px;
    background: transparent;
    border: none;
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
}

.storefront-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    font-family: 'Tomorrow', sans-serif;
    text-shadow: 
        0 0 20px rgba(0, 212, 255, 0.6),
        0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    padding-bottom: 15px;
}

.storefront-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.8), transparent);
    border-radius: 2px;
}

.storefront-items-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
}

.storefront-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(50, 76, 105, 0.95) 0%, rgba(40, 60, 85, 0.98) 100%);
    border: 2px solid rgba(217, 217, 217, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.storefront-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.6), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 2;
}

.storefront-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.storefront-item:hover {
    background: linear-gradient(135deg, rgba(60, 90, 120, 0.95) 0%, rgba(50, 75, 100, 0.98) 100%);
    border-color: rgba(0, 212, 255, 0.8);
    transform: translateX(8px) translateY(-2px);
    box-shadow: 
        0 8px 30px rgba(0, 212, 255, 0.3),
        0 0 0 1px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.storefront-item:hover::before {
    transform: translateX(100%);
}

.storefront-item:hover::after {
    opacity: 1;
}

.storefront-item-image {
    width: 100px;
    height: 100px;
    min-width: 100px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 240, 240, 0.98) 100%);
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
}

.storefront-item:hover .storefront-item-image {
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 
        0 6px 20px rgba(0, 212, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.storefront-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-placeholder {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.storefront-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.storefront-item-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Tomorrow', sans-serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    padding-bottom: 8px;
}

.storefront-item-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.8), transparent);
    transition: width 0.4s ease;
}

.storefront-item:hover .storefront-item-name::after {
    width: 100%;
}

.storefront-item-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-family: 'Tomorrow', sans-serif;
}

.storefront-item-cost {
    font-size: 1rem;
    font-weight: 700;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: auto;
    font-family: 'Tomorrow', sans-serif;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    padding: 8px 0;
    position: relative;
}

.storefront-item-cost::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(0, 212, 255, 0.1);
    transition: width 0.4s ease;
    z-index: -1;
}

.storefront-item:hover .storefront-item-cost::before {
    width: 100%;
}

.settings-dropdown:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--shadow-color);
}

.settings-dropdown option {
    background: linear-gradient(135deg, rgba(50, 76, 105, 0.95) 0%, rgba(40, 60, 85, 0.98) 100%);
    color: #ffffff;
    padding: 10px;
    border: none;
}

.settings-dropdown option:hover,
.settings-dropdown option:focus,
.settings-dropdown option:checked {
    background: linear-gradient(135deg, rgba(60, 90, 120, 0.95) 0%, rgba(50, 75, 100, 0.98) 100%);
    color: #00d4ff;
}

.settings-dropdown option:active {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
}

/* Audio Controls */
.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.audio-control-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audio-label {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border: 2px solid var(--white-border);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--shadow-color);
    transition: all 0.3s ease;
}

.audio-slider::-webkit-slider-thumb:hover {
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--shadow-color);
    transform: scale(1.1);
}

.audio-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border: 2px solid var(--white-border);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--shadow-color);
    transition: all 0.3s ease;
}

.audio-slider::-moz-range-thumb:hover {
    background: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 1);
    transform: scale(1.1);
}

.audio-slider::-moz-range-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.slider-value {
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 35px;
    text-align: right;
    transition: color 0.3s ease;
}

.panel-top-icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.panel-icons-left {
    display: flex;
    gap: 15px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.panel-icons-right {
    display: flex;
    gap: 15px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.panel-icon {
    color: #ffffff !important;
    font-size: 1.2rem !important;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: transparent;
    border: none;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
    line-height: 1;
    text-align: center;
    position: relative;
}

.panel-icon::before {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.panel-icon:hover {
    color: #00d4ff !important;
    opacity: 1;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
    background: transparent;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    transform: scale(1.1);
}

/* Ensure Font Awesome icons are visible */
.panel-icon.fas::before,
.panel-icon.far::before,
.panel-icon.fab::before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Signal Stability */
.signal-stability {
    display: flex;
    align-items: center;
    gap: 15px;
}

.signal-icon {
    font-size: 2rem;
    color: var(--accent-color);
    filter: drop-shadow(0 0 10px var(--shadow-color));
    transition: color 0.3s ease, filter 0.3s ease;
}

.signal-text {
    color: var(--text-primary);
    font-size: 1rem;
    transition: color 0.3s ease;
    font-weight: 600;
    letter-spacing: 1px;
}

#signal-percentage {
    color: #00d4ff;
    font-weight: 700;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar Styling */
.chat-messages::-webkit-scrollbar,
.rewards-container::-webkit-scrollbar,
.store-bundles-container::-webkit-scrollbar,
.storefront-items-view::-webkit-scrollbar,
.settings-view::-webkit-scrollbar,
.user-account-view::-webkit-scrollbar,
.chat-view::-webkit-scrollbar,
.store-bundles-view-left::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track,
.rewards-container::-webkit-scrollbar-track,
.store-bundles-container::-webkit-scrollbar-track,
.storefront-items-view::-webkit-scrollbar-track,
.settings-view::-webkit-scrollbar-track,
.user-account-view::-webkit-scrollbar-track,
.chat-view::-webkit-scrollbar-track,
.store-bundles-view-left::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb,
.rewards-container::-webkit-scrollbar-thumb,
.store-bundles-container::-webkit-scrollbar-thumb,
.storefront-items-view::-webkit-scrollbar-thumb,
.settings-view::-webkit-scrollbar-thumb,
.user-account-view::-webkit-scrollbar-thumb,
.chat-view::-webkit-scrollbar-thumb,
.store-bundles-view-left::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.rewards-container::-webkit-scrollbar-thumb:hover,
.store-bundles-container::-webkit-scrollbar-thumb:hover,
.storefront-items-view::-webkit-scrollbar-thumb:hover,
.settings-view::-webkit-scrollbar-thumb:hover,
.user-account-view::-webkit-scrollbar-thumb:hover,
.chat-view::-webkit-scrollbar-thumb:hover,
.store-bundles-view-left::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.8);
}

.message {
    display: block;
    padding: 10px 14px;
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.7;
    animation: messageSlideIn 0.3s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-height: auto;
    height: auto;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
}

.message:hover {
    transform: translateX(2px);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-sender {
    font-weight: 600;
    color: #ffffff;
    display: inline;
}

.message-content {
    color: #ffffff;
    display: inline;
}

.message-text {
    color: #ffffff;
    display: inline;
}

/* System messages */
.system-message,
.message.system-message {
    color: #ff6666;
}

.system-message .message-sender,
.message.system-message .message-sender {
    color: #ff6666;
}

.system-message .message-content,
.message.system-message .message-content {
    color: #ff6666;
}

/* System warnings (red) */
.message.system-warning,
.message.system-warning .message-sender,
.message.system-warning .message-content {
    color: #ff0000 !important;
}

.message-content:contains("Warning"),
.message-content:contains("warning") {
    color: #ff0000 !important;
}

/* Mood/Status messages */
.message.mood-message,
.message.status-message {
    color: #ffffff;
    font-style: italic;
}

.message.mood-message .message-sender,
.message.status-message .message-sender {
    color: #00d4ff;
    font-weight: 600;
}

/* Hide timestamps */
.message-time,
.timestamp {
    display: none !important;
}

/* User messages */
.user-message,
.message.user-message {
    color: #ffffff;
}

/* Anna messages */
.anna-message,
.message.anna-message {
    color: #ffffff;
}

/* Support for formatted messages (if markdown is used) */
.message-content strong,
.message-text strong {
    font-weight: 700;
    color: #00d4ff;
}

/* Chat Input */
.chat-input-container {
    padding: 0;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid #ffffff;
    border-radius: 6px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.chat-input-wrapper:focus-within {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.chat-buttons {
    display: none !important;
}

.btn-send {
    display: none !important;
}

.input-icon {
    color: #ffffff;
    font-size: 1rem;
    opacity: 0.7;
}

.mic-icon {
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto; /* Ensure it's clickable */
}

.mic-icon:hover {
    color: #00d4ff;
    opacity: 1;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
}

/* Listening state for mic-icon - matches voice-btn-floating behavior */
.mic-icon.listening {
    animation: pulse 1.5s ease-in-out infinite;
    color: #ff5722 !important;
    text-shadow: 0 0 15px rgba(255, 87, 34, 0.8);
    opacity: 1 !important;
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.95rem;
    padding: 5px 0;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Right Panel - Game View / Store View */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 15px 15px 15px 7.5px;
    position: relative;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.left-panel-hidden ~ .right-panel {
    padding-left: 15px;
}

.game-view,
.store-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Diagonal Lines Visualizer */
.diagonal-lines-visualizer {
    display: flex;
    gap: 3px;
    height: 30px;
    align-items: flex-end;
    padding: 5px 0;
    flex-shrink: 0;
    flex: 1;
    justify-content: flex-start;
}

.diagonal-line {
    flex: 1;
    height: 100%;
    background: rgba(0, 212, 255, 0.2);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.diagonal-line.filled {
    background: #00d4ff;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.game-frame {
    width: 100%;
    height: 100%;
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
    background: transparent;
}

.sub-frame-error {
    border: 1px solid #ffffff !important;
}


/* Store Bundles Container */
.store-bundles-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    min-height: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(1, 30, 41, 0.95) 0%, rgba(0, 20, 30, 0.98) 100%);
    position: relative;
}

.store-bundles-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.bundles-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.bundle-card {
    background: linear-gradient(135deg, rgba(50, 76, 105, 0.9) 0%, rgba(30, 45, 65, 0.95) 100%);
    border: 2px solid rgba(217, 217, 217, 0.3);
    border-radius: 8px;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 160px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bundle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.6), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 3;
}

.bundle-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.bundle-card:hover {
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 
        0 8px 30px rgba(0, 212, 255, 0.3),
        0 0 0 1px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(135deg, rgba(60, 90, 120, 0.95) 0%, rgba(40, 60, 85, 0.98) 100%);
}

.bundle-card:hover::before {
    transform: translateX(100%);
}

.bundle-card:hover::after {
    opacity: 1;
}

.bundle-image-placeholder {
    width: 120px;
    height: 120px;
    min-width: 120px;
    background: linear-gradient(135deg, rgba(90, 107, 138, 0.8) 0%, rgba(60, 71, 96, 0.9) 100%);
    border: 2px solid rgba(217, 217, 217, 0.5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 20px 0 20px 20px;
    z-index: 2;
    position: relative;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    overflow: visible;
    padding: 10px;
}

/* Larger placeholder for bundles with more gems */
.bundle-icon-medium .bundle-image-placeholder {
    width: 130px;
    height: 130px;
    min-width: 130px;
}

.bundle-icon-large .bundle-image-placeholder {
    width: 140px;
    height: 140px;
    min-width: 140px;
}

.bundle-icon-five .bundle-image-placeholder {
    width: 140px;
    height: 140px;
    min-width: 140px;
}

.bundle-image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: transform 0.6s ease;
}

.bundle-card:hover .bundle-image-placeholder {
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 
        0 6px 20px rgba(0, 212, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.bundle-card:hover .bundle-image-placeholder::before {
    transform: rotate(45deg) translate(100%, 100%);
}

.bundle-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    z-index: 1;
    position: relative;
}

/* Bundle Icon Styling */
.bundle-icon-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.bundle-image-placeholder .bundle-icon {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3em;
    align-items: center;
    justify-items: center;
    width: 100%;
    height: 100%;
    padding: 5px;
}

/* Individual gem icon styling */
.bundle-icon .gem-icon-single {
    display: inline-block;
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6));
    transition: all 0.3s ease;
    animation: gemPulse 2s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
}

/* Different sizes for different bundle tiers */
.bundle-icon-small .bundle-icon {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.bundle-icon-small .bundle-icon .gem-icon-single {
    font-size: 3rem;
}

.bundle-icon-medium .bundle-icon {
    grid-template-columns: repeat(2, 1fr);
}

.bundle-icon-medium .bundle-icon .gem-icon-single {
    font-size: 2rem;
}

.bundle-icon-large .bundle-icon {
    grid-template-columns: repeat(3, 1fr);
}

.bundle-icon-large .bundle-icon .gem-icon-single {
    font-size: 1.4rem;
}

/* Special layout for 5 gems (50 Gems bundle) - 2-2-1 centered arrangement */
.bundle-icon-five .bundle-icon {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.bundle-icon-five .bundle-icon .gem-icon-single {
    font-size: 1.4rem;
}

/* Center the 5th gem by making it span both columns */
.bundle-icon-five .bundle-icon .gem-icon-single:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: center;
}

/* Staggered animation for multiple gems */
.bundle-icon .gem-icon-single:nth-child(1) { animation-delay: 0s; }
.bundle-icon .gem-icon-single:nth-child(2) { animation-delay: 0.2s; }
.bundle-icon .gem-icon-single:nth-child(3) { animation-delay: 0.4s; }
.bundle-icon .gem-icon-single:nth-child(4) { animation-delay: 0.6s; }
.bundle-icon .gem-icon-single:nth-child(5) { animation-delay: 0.8s; }
.bundle-icon .gem-icon-single:nth-child(6) { animation-delay: 1s; }

/* Hover effects */
.bundle-card:hover .bundle-image-placeholder .bundle-icon {
    transform: scale(1.05);
}

.bundle-card:hover .bundle-image-placeholder .gem-icon-single {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.9));
    text-shadow: 0 0 25px rgba(0, 212, 255, 1);
    animation: gemPulse 0.8s ease-in-out infinite;
}

/* Pulse animation for gem icons */
@keyframes gemPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.6));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.8));
    }
}

.bundle-card:hover .bundle-image-placeholder .bundle-icon {
    animation: gemPulse 0.8s ease-in-out infinite;
}

.bundle-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    position: relative;
    padding: 24px 24px 24px 0;
    z-index: 2;
}

.bundle-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    font-family: 'Tomorrow', sans-serif;
    position: relative;
    padding-bottom: 8px;
}

.bundle-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.8), transparent);
    transition: width 0.4s ease;
}

.bundle-card:hover .bundle-name::after {
    width: 100%;
}

.bundle-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    flex: 1;
    font-family: 'Tomorrow', sans-serif;
}

.bundle-cost {
    font-size: 1rem;
    font-weight: 700;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: auto;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    font-family: 'Tomorrow', sans-serif;
    padding: 8px 0;
    position: relative;
}

.bundle-cost::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(0, 212, 255, 0.1);
    transition: width 0.4s ease;
    z-index: -1;
}

.bundle-card:hover .bundle-cost::before {
    width: 100%;
}

.bundle-card.has-item {
    border-color: rgba(40, 167, 69, 0.6);
    box-shadow: 
        0 4px 20px rgba(40, 167, 69, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(30, 45, 65, 0.95) 100%);
}

.bundle-card.has-item:hover {
    border-color: rgba(40, 167, 69, 0.9);
    box-shadow: 
        0 8px 30px rgba(40, 167, 69, 0.4),
        0 0 0 1px rgba(40, 167, 69, 0.3);
}

.bundle-card.has-item .bundle-cost {
    color: #28a745;
    text-shadow: 0 0 10px rgba(40, 167, 69, 0.6);
}

/* Purchase Confirmation View */
.purchase-confirmation-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    backdrop-filter: blur(5px);
    }

.purchase-confirmation-content {
    text-align: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00d4ff;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.5);
    max-width: 600px;
    width: 90%;
    }

.purchase-title {
    font-size: 4rem;
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 30px;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
    font-family: 'Tomorrow', sans-serif;
}

.purchase-title.failed {
    color: #ff6666;
    text-shadow: 0 0 30px rgba(255, 102, 102, 0.8);
    }

.purchase-message {
        font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 40px;
    line-height: 1.6;
    }

.btn-confirm {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    padding: 15px 50px;
        font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn-confirm:hover {
    background: #00d4ff;
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    transform: translateY(-2px);
    }

/* Rewards View */
.rewards-view {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 0;
    border: 2px solid #ffffff;
    background: #011e29;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.rewards-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.rewards-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.rewards-header {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.rewards-title {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    text-shadow: 
        0 0 20px rgba(0, 212, 255, 0.6),
        0 2px 10px rgba(0, 0, 0, 0.5);
    font-family: 'Tomorrow', sans-serif;
    position: relative;
    padding-bottom: 20px;
}

.rewards-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.8), transparent);
    border-radius: 2px;
}

.rewards-content {
    min-height: 200px;
    position: relative;
    z-index: 1;
}

.rewards-loading,
.rewards-message {
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
    font-family: 'Tomorrow', sans-serif;
}
    
.rewards-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.rewards-section {
    background: linear-gradient(135deg, rgba(50, 76, 105, 0.9) 0%, rgba(30, 45, 65, 0.95) 100%);
    border: 2px solid rgba(217, 217, 217, 0.3);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.rewards-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.rewards-section > * {
    position: relative;
    z-index: 1;
}

.rewards-section-title {
    color: #00d4ff;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    font-family: 'Tomorrow', sans-serif;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    position: relative;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.rewards-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: rgba(0, 212, 255, 0.8);
    transition: width 0.4s ease;
}

.rewards-section:hover .rewards-section-title::after {
    width: 100%;
}

.reward-item {
    background: linear-gradient(135deg, rgba(50, 76, 105, 0.95) 0%, rgba(40, 60, 85, 0.98) 100%);
    border: 2px solid rgba(217, 217, 217, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.reward-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.6), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 1;
}

.reward-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.reward-item:hover {
    background: linear-gradient(135deg, rgba(60, 90, 120, 0.95) 0%, rgba(50, 75, 100, 0.98) 100%);
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 
        0 8px 30px rgba(0, 212, 255, 0.3),
        0 0 0 1px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateX(8px) translateY(-3px);
}

.reward-item:hover::before {
    transform: translateX(100%);
}

.reward-item:hover::after {
    opacity: 1;
}

.reward-item > * {
    position: relative;
    z-index: 2;
}

.reward-name {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Tomorrow', sans-serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reward-amount {
    color: #00d4ff;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Tomorrow', sans-serif;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reward-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 8px;
    font-family: 'Tomorrow', sans-serif;
}

.reward-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin-top: 10px;
    line-height: 1.6;
    font-family: 'Tomorrow', sans-serif;
}


.game-scene {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Hide any game overlays that might be added */
.game-overlay,
.game-top-bar,
.objective-overlay,
.room-indicator,
.recording-indicator,
.game-timestamp {
    display: none !important;
}

.iframe-fullscreen {
        width: 100%;
    height: 100%;
    border: none;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    }
    
/* Store Panel */
.store-panel-toggle {
    position: fixed;
    bottom: 50px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 212, 255, 0.2);
    border: 2px solid #00d4ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    color: #00d4ff;
    font-size: 1.5rem;
}

.store-panel-toggle:hover {
    background: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    transform: scale(1.1);
    }
    
    .store-panel {
    position: fixed;
    bottom: 110px;
    right: 20px;
    width: 400px;
    max-height: 500px;
    background: #1a1a1a;
    border: 2px solid #00d4ff;
    border-radius: 10px;
    padding: 20px;
    z-index: 998;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
    overflow-y: auto;
    }

.store-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.store-icon {
    font-size: 1.5rem;
    }

.store-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    flex: 1;
    }

.refresh-store-btn,
.close-store-btn {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid #00d4ff;
    color: #00d4ff;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    }

.refresh-store-btn:hover,
.close-store-btn:hover {
    background: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    }

.store-items-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    }

.store-item {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.store-item:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    transform: translateX(5px);
}

.item-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
}

.item-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 5px;
}

.item-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Footer */
.footer {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    margin-top: 10px;
    padding-left: 10px;
}

.footer-text {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    font-family: 'Tomorrow', sans-serif;
}

/* Modals - Dark Theme */
.modal-content {
    background: #1a1a1a !important;
    border: 2px solid #00d4ff !important;
    border-radius: 10px !important;
    color: #ffffff !important;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 212, 255, 0.3) !important;
    background: rgba(0, 212, 255, 0.05) !important;
}

.modal-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.btn-close {
    filter: invert(1) !important;
    opacity: 0.8 !important;
}

.btn-close:hover {
    opacity: 1 !important;
}

.modal-body {
    color: #ffffff !important;
    }

.form-label {
    color: #ffffff !important;
}

.form-control {
    background: rgba(0, 212, 255, 0.05) !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    color: #ffffff !important;
    }

.form-control:focus {
    background: rgba(0, 212, 255, 0.1) !important;
    border-color: #00d4ff !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3) !important;
    color: #ffffff !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.btn-primary {
    background: #00d4ff !important;
    border-color: #00d4ff !important;
    color: #0a0a0a !important;
    font-weight: 600 !important;
}

.btn-primary:hover {
    background: #00b8e6 !important;
    border-color: #00b8e6 !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6) !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.text-danger {
    color: #ff6666 !important;
}

.text-success {
    color: #00ff88 !important;
}

.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Notification Container */
#notification-container {
    position: fixed;
    bottom: 50px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .left-panel {
        width: 40%;
        min-width: 300px;
    }

    .game-header-title {
        font-size: 1.4rem;
    }

    /* Reduce gem icon effects on tablets for performance */
    #gem-icon-btn::after {
        font-size: 0.45rem;
    }

    #gem-icon-btn i {
        filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
    }
}

@media (max-width: 768px) {
    .main-content-wrapper {
        flex-direction: column; /* Stack vertically on mobile */
        gap: 0;
        height: 100%;
    }

    /* Swap panel order on mobile: game panel (right-panel) on top, chat panel (left-panel) on bottom */
    .left-panel {
        order: 2; /* Chat panel goes to bottom */
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 35%; /* Reduced height for left panel */
        min-height: 35%; /* Ensure minimum height */
        border-right: none;
        border-top: 2px solid rgba(0, 212, 255, 0.6); /* Border on top instead of bottom */
        border-bottom: none;
        padding: 12px 6px 12px 12px;
        overflow-y: auto; /* Enable vertical scrolling */
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        flex-shrink: 0; /* Don't shrink */
    }

    .left-panel-hidden {
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        border-top: none !important;
    }

    .right-panel {
        order: 1; /* Game panel goes to top */
        width: 100%;
        height: 65%; /* Increased height for right panel */
        min-height: 65%; /* Ensure minimum height */
        overflow: hidden;
        flex-shrink: 0; /* Don't shrink */
    }

    .left-panel-hidden ~ .right-panel {
        height: 100% !important;
        min-height: 100% !important;
    }

    /* Responsive gem icon on mobile */
    #gem-icon-btn {
        background: linear-gradient(135deg, 
            rgba(138, 43, 226, 0.15) 0%, 
            rgba(0, 191, 255, 0.15) 50%,
            rgba(255, 20, 147, 0.15) 100%);
    }

    #gem-icon-btn::after {
        font-size: 0.4rem;
        top: 1px;
        right: 1px;
    }

    #gem-icon-btn i {
        filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
    }

    #gem-icon-btn:hover i {
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
        animation: none; /* Disable animation on mobile for performance */
    }

    /* Responsive toggle panel button */
    .btn-toggle-panel {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Responsive header bottom row */
    .header-bottom-row {
        gap: 12px;
    }

    .header-bottom-row .header-buttons {
        gap: 12px;
    }

    .btn-header {
        padding: 8px 14px;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .game-header {
        padding: 10px 15px;
        height: 50px;
        margin-bottom: 10px;
    }

    .game-header-title {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .game-header-buttons {
        gap: 8px;
    }

    .btn-header {
        padding: 8px 14px;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .player-info {
        flex-direction: column;
        gap: 5px;
        align-items: flex-end;
    }
    
    /* Touch-friendly sizes */
    .panel-icon {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
    }

    /* Responsive gem icon - reduce effects on mobile for performance */
    #gem-icon-btn {
        background: linear-gradient(135deg, 
            rgba(138, 43, 226, 0.15) 0%, 
            rgba(0, 191, 255, 0.15) 50%,
            rgba(255, 20, 147, 0.15) 100%);
    }

    #gem-icon-btn::after {
        font-size: 0.4rem;
        top: 1px;
        right: 1px;
    }

    #gem-icon-btn i {
        filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
    }

    #gem-icon-btn:hover i {
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    }

    /* Responsive toggle panel button */
    .btn-toggle-panel {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .chat-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .settings-dropdown {
        min-height: 48px;
        padding: 14px 45px 14px 18px;
    }
    
    .volume-btn-inline {
        min-width: 48px;
        min-height: 48px;
    }
    
    /* Better spacing */
    .panel-section {
        padding: 10px;
    }
    
    .chat-messages {
        padding: 10px 6px;
    }
}

@media (max-width: 480px) {
    /* Keep stacked layout on small mobile */
    .main-content-wrapper {
        flex-direction: column;
    }

    /* Swap panel order on mobile: game panel (right-panel) on top, chat panel (left-panel) on bottom */
    .left-panel {
        order: 2; /* Chat panel goes to bottom */
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 35%; /* Reduced height for left panel */
        min-height: 35%;
        padding: 10px 4px 10px 10px;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        border-top: 2px solid rgba(0, 212, 255, 0.6); /* Border on top instead of bottom */
        border-bottom: none;
    }

    .right-panel {
        order: 1; /* Game panel goes to top */
        width: 100%;
        height: 65%; /* Increased height for right panel */
        min-height: 65%;
    }

    .game-header {
        padding: 8px 10px;
        height: 45px;
    }

    .game-header-title {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .btn-header {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-height: 44px;
    }

    .left-panel {
        padding: 15px;
    }

    .store-panel {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }

    /* Responsive gem icon on small screens */
    #gem-icon-btn {
        background: linear-gradient(135deg, 
            rgba(138, 43, 226, 0.1) 0%, 
            rgba(0, 191, 255, 0.1) 50%,
            rgba(255, 20, 147, 0.1) 100%);
    }

    #gem-icon-btn::after {
        display: none; /* Hide sparkle on very small screens */
    }

    #gem-icon-btn i {
        filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
    }

    #gem-icon-btn:hover i {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
    }

    /* Responsive toggle panel button */
    .btn-toggle-panel {
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Responsive header bottom row */
    .header-bottom-row {
        gap: 10px;
        flex-wrap: wrap;
    }

    .header-bottom-row .header-buttons {
        gap: 10px;
    }

    /* Responsive achievements section */
    .achievements-section {
        padding: 15px;
    }

    .achievements-label {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .achievement-card {
        padding: 15px;
        gap: 8px;
    }

    .achievement-name {
        font-size: 0.95rem;
    }

    .achievement-description {
        font-size: 0.8rem;
    }
}

/* Utility Classes */
.display-none {
    display: none;
}

/* Legacy Support - Keep old classes for compatibility */
.top-panel,
.bottom-panel,
.instructions-container,
.instructions-panel {
    display: none;
}

/* Command Dropdown (hidden but functional) */
.chat-command-dropdown {
    padding: 6px 30px 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Tomorrow', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    min-width: 120px;
}

.chat-command-dropdown:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
    color: #ffffff;
}

.chat-command-dropdown:focus {
    outline: none;
    background: rgba(0, 212, 255, 0.3);
    border-color: #00d4ff;
    color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.chat-command-dropdown option {
    background: rgba(50, 76, 105, 0.95);
    color: #ffffff;
    padding: 8px;
}

/* Chat Buttons */
.chat-btn {
    background: rgba(0, 212, 255, 0.2) !important;
    border: 1px solid #00d4ff !important;
    color: #00d4ff !important;
    border-radius: 6px !important;
    padding: 8px 15px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.chat-btn:hover {
    background: rgba(0, 212, 255, 0.4) !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6) !important;
}

/* Voice Button */
.voice-btn-floating {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 212, 255, 0.2);
    border: 2px solid #00d4ff;
    border-radius: 50%;
    color: #00d4ff;
    display: flex;
        align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    font-size: 1.3rem;
    }

.voice-btn-floating:hover {
    background: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    transform: scale(1.1);
}
