/* CSS Variables for Themes */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-card: rgba(26, 26, 26, 0.95);
    --bg-panel: rgba(0, 0, 0, 0.3);
    --text-primary: #e0e0e0;
    --text-secondary: #bdc3c7;
    --text-accent: #00d4ff;
    --border-primary: #333;
    --border-accent: rgba(0, 212, 255, 0.3);
    --accent-primary: #00d4ff;
    --accent-secondary: #00ff88;
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
}

/* Light Theme */
body.theme-light {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-panel: rgba(255, 255, 255, 0.8);
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-accent: #3498db;
    --border-primary: #dee2e6;
    --border-accent: rgba(52, 152, 219, 0.3);
    --accent-primary: #3498db;
    --accent-secondary: #27ae60;
    --danger: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
}

/* Cyberpunk Theme */
body.theme-cyberpunk {
    --bg-primary: #0d0208;
    --bg-secondary: #1a0e1a;
    --bg-tertiary: #2d1b2d;
    --bg-card: rgba(26, 14, 26, 0.95);
    --bg-panel: rgba(13, 2, 8, 0.5);
    --text-primary: #ff006e;
    --text-secondary: #ff4081;
    --text-accent: #00ffff;
    --border-primary: #ff006e;
    --border-accent: rgba(255, 0, 110, 0.5);
    --accent-primary: #00ffff;
    --accent-secondary: #ff006e;
    --danger: #ff1744;
    --success: #39ff14;
    --warning: #ffff00;
}

/* Minimal Theme */
body.theme-minimal {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f5f5;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-panel: rgba(250, 250, 250, 0.8);
    --text-primary: #424242;
    --text-secondary: #757575;
    --text-accent: #2196f3;
    --border-primary: #e0e0e0;
    --border-accent: rgba(33, 150, 243, 0.2);
    --accent-primary: #2196f3;
    --accent-secondary: #4caf50;
    --danger: #f44336;
    --success: #4caf50;
    --warning: #ff9800;
}

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Tutorial Overlay */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    backdrop-filter: blur(5px);
}

.tutorial-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    padding: 40px;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    border-radius: 12px;
}

.tutorial-step {
    display: none;
}

.tutorial-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tutorial-step h2 {
    color: var(--text-accent);
    margin-bottom: 20px;
    font-family: 'Orbitron', monospace;
}

.tutorial-step p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.tutorial-step ul, .tutorial-step ol {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 20px;
    padding-left: 20px;
}

.tutorial-step li {
    margin-bottom: 8px;
}

.tutorial-progress {
    background: var(--accent-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
    font-weight: bold;
}

.tutorial-crypto-list {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--accent-primary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.tutorial-crypto-list div {
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.tutorial-event-examples {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.tutorial-event-examples div {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.tutorial-strategies {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.tutorial-strategies div {
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.tutorial-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tutorial-highlight {
    position: absolute;
    border: 2px solid #007acc;
    box-shadow: 0 0 8px rgba(0, 122, 204, 0.3);
    pointer-events: none;
    z-index: 1000;
    animation: pulse 2s infinite;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.screen.active {
    display: block;
}

#game-screen {
    display: none;
    min-height: 100vh;
    width: 100%;
    background: var(--bg-primary);
    overflow-x: hidden;
}

#game-screen.active {
    display: block;
}

/* Character Selection Screen */
#character-select {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
}

#character-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 107, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.03) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes backgroundPulse {
    0% {
        background: 
            radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(255, 107, 107, 0.05) 0%, transparent 50%),
            radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.03) 0%, transparent 50%);
    }
    100% {
        background: 
            radial-gradient(circle at 30% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 60%),
            radial-gradient(circle at 70% 80%, rgba(255, 107, 107, 0.08) 0%, transparent 60%),
            radial-gradient(circle at 40% 60%, rgba(0, 255, 136, 0.05) 0%, transparent 60%);
    }
}

.character-select-container {
    max-width: 1000px;
    padding: 10px 0 0 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.character-select-container h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #00d4ff, #ff6b6b, #00ff88);
    background-size: 250% 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease-in-out infinite, titlePulse 3s ease-in-out infinite alternate;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    letter-spacing: 2px;
    position: relative;
    transform: translateY(0);
}

.character-select-container h2 {
    font-size: 1.2rem;
    color: #bdc3c7;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    animation: subtitleGlow 4s ease-in-out infinite alternate;
    text-shadow: 0 0 10px rgba(189, 195, 199, 0.2);
    letter-spacing: 0.5px;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
    min-height: 0;
    min-width: 0;
    height: 55vh;
    align-items: center;
    justify-items: center;
}

.character-card {
    background: linear-gradient(145deg, #1a1a1a, #141414);
    border: 1px solid #333;
    min-width: 0;
    min-height: 0;
    width: 100%;
    max-width: 260px;
    height: 100%;
    max-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 20px rgba(0,212,255,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 10px 8px;
    animation: cardSlideIn 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

.character-card.selected, .character-card:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.4), 0 8px 20px rgba(0,0,0,0.4);
    z-index: 2;
    background: linear-gradient(145deg, #1f1f1f, #1a1a1a);
    transform: translateY(-5px) scale(1.05);
}

.character-card:hover {
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2), 0 4px 15px rgba(0,0,0,0.4);
    border-color: #00d4ff;
    transform: translateY(-3px) scale(1.03);
    z-index: 2;
    background: linear-gradient(145deg, #1e1e1e, #161616);
}

.character-avatar {
    font-size: 1.5rem;
    margin-bottom: 6px;
    filter: none;
}

.character-card h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: #ecf0f1;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
}

.character-card p {
    font-size: 0.7rem;
    margin-bottom: 6px;
    line-height: 1.2;
    color: #bdc3c7;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    padding: 0 2px;
}

.character-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.character-stats span {
    padding: 2px 6px;
    font-size: 0.65rem;
    border-radius: 6px;
    margin-bottom: 2px;
    background: rgba(255,255,255,0.08);
    color: #ecf0f1;
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    border: none;
}

.btn-primary {
    background: #007acc;
    color: white;
    padding: 12px 24px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover:not(:disabled), .btn-primary:focus {
    background: #005a99;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
    background: linear-gradient(45deg, #c0392b, #a93226);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .character-select-container {
        max-width: 100vw;
        padding: 8px 0 0 0;
    }
    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 12px;
        height: 70vh;
    }
    .character-card {
        max-width: 160px;
        max-height: 180px;
        padding: 10px 8px;
    }
    .character-avatar {
        font-size: 1.4rem;
    }
    .character-card h3 {
        font-size: 0.9rem;
    }
    .character-card p {
        font-size: 0.7rem;
        line-height: 1.2;
    }
    .character-stats span {
        font-size: 0.6rem;
        padding: 2px 4px;
    }
}

@media (max-width: 600px) {
    .character-select-container {
        padding: 5px 10px 0 10px;
    }
    .character-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, 1fr);
        gap: 10px;
        height: 85vh;
    }
    .character-card {
        max-width: 300px;
        max-height: 150px;
        padding: 12px 10px;
    }
    .character-avatar {
        font-size: 1.6rem;
    }
    .character-card h3 {
        font-size: 1rem;
    }
    .character-card p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    .character-stats span {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
}

.btn-primary {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4), 0 0 30px rgba(0, 212, 255, 0.2);
    animation: buttonGlow 2s ease-in-out infinite alternate;
}

@keyframes buttonGlow {
    0% {
        box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4), 0 0 30px rgba(0, 212, 255, 0.2);
    }
    100% {
        box-shadow: 0 15px 35px rgba(0, 212, 255, 0.6), 0 0 40px rgba(0, 212, 255, 0.3);
    }
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

/* Main Game Screen */
#game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.game-header {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 20px var(--border-accent),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.05), transparent);
    animation: headerShimmer 4s infinite;
}

@keyframes headerShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.header-title-section {
    text-align: center;
    margin-bottom: 20px;
    z-index: 2;
    position: relative;
}

.header-title-section h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3.2rem;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(135deg, #00d4ff, #ff6b6b, #00ff88);
    background-size: 250% 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    letter-spacing: 3px;
    position: relative;
}

.header-title-section h1::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    background-size: 200% 200%;
    z-index: -1;
    border-radius: 8px;
    opacity: 0.1;
    animation: gradientShift 6s ease-in-out infinite;
    filter: blur(6px);
}

.contract-address {
    font-family: 'Roboto', monospace;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 4px 0 16px 0;
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.5px;
    opacity: 0.8;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.contract-address:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-primary);
    color: var(--text-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.contract-address:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 212, 255, 0.3);
}

/* Enhanced styling for main game header contract address */
.header-title-section .contract-address {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 12px 0 0 0;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    border: 2px solid var(--accent-primary);
    border-radius: 6px;
    color: var(--text-accent);
    opacity: 0.9;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.1);
    letter-spacing: 1px;
}

.header-title-section .contract-address:hover {
    opacity: 1;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8));
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.3);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
}

.header-title-section .contract-address:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    z-index: 2;
    position: relative;
}

.header-left {
    flex: 0 0 auto;
    text-align: left;
    z-index: 2;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes titlePulse {
    0% { 
        transform: translateY(0) scale(1); 
        text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    }
    100% { 
        transform: translateY(-2px) scale(1.02); 
        text-shadow: 0 0 30px rgba(0, 212, 255, 0.5), 0 0 50px rgba(255, 107, 107, 0.2);
    }
}

@keyframes subtitleGlow {
    0% { 
        color: #bdc3c7; 
        text-shadow: 0 0 10px rgba(189, 195, 199, 0.2);
    }
    100% { 
        color: #ecf0f1; 
        text-shadow: 0 0 15px rgba(189, 195, 199, 0.4), 0 0 25px rgba(0, 212, 255, 0.1);
    }
}

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Staggered card animations */
.character-card:nth-child(1) { animation-delay: 0.1s; }
.character-card:nth-child(2) { animation-delay: 0.2s; }
.character-card:nth-child(3) { animation-delay: 0.3s; }
.character-card:nth-child(4) { animation-delay: 0.4s; }
.character-card:nth-child(5) { animation-delay: 0.5s; }
.character-card:nth-child(6) { animation-delay: 0.6s; }

.character-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ecf0f1;
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.character-info::before {
    content: '👤';
    font-size: 1.4em;
    filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.5));
}

.player-name-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    z-index: 2;
}

.player-name-display {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.7) 0%, 
        rgba(30, 30, 30, 0.9) 50%, 
        rgba(0, 0, 0, 0.7) 100%);
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    text-align: center;
    backdrop-filter: blur(5px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: nameGlow 2.5s ease-in-out infinite;
}

@keyframes nameGlow {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(0, 212, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        transform: scale(1.01);
    }
}

.player-name-label {
    color: #bdc3c7;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 0.5rem;
}

.player-name-value {
    color: #00d4ff;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
    animation: nameTextGlow 3s ease-in-out infinite alternate;
}

@keyframes nameTextGlow {
    0% {
        text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
    }
    100% {
        text-shadow: 
            0 0 8px rgba(0, 212, 255, 0.5),
            0 0 12px rgba(0, 212, 255, 0.6);
    }
}

.player-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: center;
    flex: 1;
    max-width: 1200px;
    z-index: 2;
    margin-top: 1rem;
}

.stat {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.6) 0%, 
        rgba(30, 30, 30, 0.8) 50%, 
        rgba(0, 0, 0, 0.6) 100%);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 8px;
    padding: 1rem 0.8rem 0.5rem 0.8rem;
    text-align: center;
    min-width: 0;
    flex: 1 1 150px;
    max-width: 180px;
    min-height: 80px;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: statPulse 3s ease-in-out infinite;
}

@keyframes statPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 3px 10px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 
            0 5px 20px rgba(0, 212, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

/* Removed the blue line animation for cleaner look */

.stat:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 212, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: hoverPulse 0.6s ease-in-out infinite;
}

@keyframes hoverPulse {
    0%, 100% {
        transform: translateY(-5px) scale(1.05);
    }
    50% {
        transform: translateY(-5px) scale(1.08);
    }
}

.stat-label {
    color: #bdc3c7;
    font-size: 0.7rem;
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    animation: labelFade 4s ease-in-out infinite;
}

@keyframes labelFade {
    0%, 100% {
        opacity: 0.8;
        color: #bdc3c7;
    }
    50% {
        opacity: 1;
        color: #00d4ff;
    }
}

.stat-value {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-size: clamp(1rem, 3vw, 1.8rem);
    width: 100%;
    min-width: 0;
    display: block;
    line-height: 1.1;
    color: #ffffff;
    font-weight: 800;
    font-family: 'Orbitron', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
    hyphens: auto;
    animation: valueGlow 2s ease-in-out infinite alternate;
}

@keyframes valueGlow {
    0% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }
    100% {
        text-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.5),
            0 0 8px rgba(0, 212, 255, 0.4);
    }
}

@media (max-width: 1200px) {
    .player-stats {
        gap: 0.6rem;
    }
    .stat {
        flex: 1 1 130px;
        padding: 0.9rem 0.7rem 0.4rem 0.7rem;
        min-height: 70px;
    }
    .stat-value {
        font-size: clamp(0.9rem, 2.5vw, 1.6rem);
    }
}

@media (max-width: 900px) {
    .player-stats {
        gap: 0.5rem;
    }
    .stat {
        flex: 1 1 110px;
        padding: 0.7rem 0.6rem 0.3rem 0.6rem;
        min-height: 65px;
    }
    .stat-value {
        font-size: clamp(0.8rem, 2.2vw, 1.4rem);
    }
}

/* Special stat styling for different types */
.stat:nth-child(1) {
    border-color: rgba(241, 196, 15, 0.4);
    animation-delay: 0s;
}

.stat:nth-child(2) {
    animation-delay: 0.5s;
}

.stat:nth-child(3) {
    animation-delay: 1s;
}

.stat:nth-child(4) {
    animation-delay: 1.5s;
}

.stat:nth-child(5) {
    animation-delay: 2s;
}

.stat:nth-child(6) {
    animation-delay: 2.5s;
}

/* Handle long text in stat values */
.stat-value:contains('$') {
    font-size: clamp(0.8rem, 2.5vw, 1.6rem);
}

/* Specific styling for money amounts */
.stat-value[id*="balance"],
.stat-value[id*="amount"] {
    font-size: clamp(0.8rem, 2.2vw, 1.5rem);
    line-height: 1.1;
}

/* Handle very long numbers */
.stat-value:contains('000') {
    font-size: clamp(0.7rem, 2vw, 1.4rem);
}

.stat:nth-child(1):hover {
    border-color: rgba(241, 196, 15, 0.8);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(241, 196, 15, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat:nth-child(1) .stat-value {
    color: #f1c40f;
}

.stat:nth-child(2) {
    border-color: rgba(155, 89, 182, 0.4);
}

.stat:nth-child(2):hover {
    border-color: rgba(155, 89, 182, 0.8);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(155, 89, 182, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat:nth-child(2) .stat-value {
    color: #9b59b6;
}

.stat:nth-child(3) {
    border-color: rgba(46, 204, 113, 0.4);
}

.stat:nth-child(3):hover {
    border-color: rgba(46, 204, 113, 0.8);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(46, 204, 113, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat:nth-child(3) .stat-value {
    color: #2ecc71;
}

.stat:nth-child(4) {
    border-color: rgba(230, 126, 34, 0.4);
}

.stat:nth-child(4):hover {
    border-color: rgba(230, 126, 34, 0.8);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(230, 126, 34, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat:nth-child(4) .stat-value {
    color: #e67e22;
}

.stat:nth-child(5) {
    border-color: rgba(52, 152, 219, 0.4);
}

.stat:nth-child(5):hover {
    border-color: rgba(52, 152, 219, 0.8);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(52, 152, 219, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat:nth-child(5) .stat-value {
    color: #3498db;
}

.stat:nth-child(6) {
    border-color: rgba(231, 76, 60, 0.4);
}

.stat:nth-child(6):hover {
    border-color: rgba(231, 76, 60, 0.8);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(231, 76, 60, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat:nth-child(6) .stat-value {
    color: #e74c3c;
}

/* Navigation Tabs */
.game-nav {
    display: flex;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 5px;
    margin-bottom: 20px;
}

.nav-tab {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: #bdc3c7;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
}

.nav-tab.active {
    background: #007acc;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Trading Terminal */
.trading-terminal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.terminal-header {
    background: var(--bg-tertiary);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-primary);
}

.terminal-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.terminal-controls {
    display: flex;
    gap: 10px;
}

.terminal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}

/* Trading Panel */
.trading-panel {
    padding: 25px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Crypto Selector */
.crypto-selector h3 {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.crypto-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.crypto-option {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}

.crypto-option:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.crypto-option.active {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px var(--border-accent);
}

.crypto-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.crypto-info {
    flex: 1;
}

.crypto-name {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.crypto-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2ecc71;
    margin-bottom: 3px;
}

.crypto-change {
    font-size: 0.9rem;
    font-weight: bold;
}

.crypto-change.positive {
    color: #2ecc71;
}

.crypto-change.negative {
    color: #e74c3c;
}

.crypto-indicators {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.hype-meter {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hype-label {
    font-size: 0.8rem;
    color: #f39c12;
    font-weight: bold;
}

.hype-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.hype-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e67e22);
    transition: width 0.3s ease;
}

.hype-value {
    font-size: 0.8rem;
    color: #f39c12;
    font-weight: bold;
    text-align: right;
}

.rug-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rug-label {
    font-size: 0.8rem;
    color: #e74c3c;
    font-weight: bold;
}

.rug-value {
    font-size: 0.8rem;
    color: #e74c3c;
    font-weight: bold;
}

/* Trading Interface */
.trading-interface {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.trading-interface h3 {
    color: #bdc3c7;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.trade-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trade-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trade-input-group label {
    color: #bdc3c7;
    font-size: 0.9rem;
    font-weight: bold;
}

.trade-input-group input {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.trade-input-group input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.trade-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-buy {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
}

.btn-sell {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
}

.btn-buy:hover, .btn-sell:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}



.trade-preview {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #bdc3c7;
    font-size: 0.9rem;
}

.preview-item:last-child {
    margin-bottom: 0;
}

/* Chart Panel */
.chart-panel {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Mini Chart */
.mini-chart-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-header h3 {
    color: #ecf0f1;
    margin: 0;
    font-size: 1.1rem;
}

.chart-timeframes {
    display: flex;
    gap: 5px;
}

.timeframe-btn {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #bdc3c7;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.timeframe-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ecf0f1;
}

.timeframe-btn.active {
    background: #00d4ff;
    color: white;
    border-color: #00d4ff;
}

.mini-chart-wrapper {
    height: 200px;
    position: relative;
}

/* Market Indicators */
.market-indicators h3 {
    color: #bdc3c7;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.indicator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.indicator-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.indicator-title {
    color: #bdc3c7;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: bold;
}

.indicator-value {
    color: #ecf0f1;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.indicator-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.indicator-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.hype-fill {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.rug-fill {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.volume-fill {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.volatility-fill {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

/* Portfolio */
.portfolio h3 {
    color: #bdc3c7;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

#portfolio-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Custom Select Dropdowns */
.custom-select {
    position: relative;
    display: inline-block;
}

.custom-select select {
    background: rgba(20, 30, 40, 0.95) url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 8px center;
    background-size: 14px;
    color: #fff;
    border: 1.5px solid #00d4ff;
    border-radius: 5px;
    min-width: 90px;
    font-size: 0.95rem;
    padding: 7px 28px 7px 10px;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.08);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.custom-select select:focus-visible {
    outline: 2px solid #00ffea;
    outline-offset: 2px;
}
.custom-select option {
    background: #181c2b;
    color: #fff;
    font-size: 0.97rem;
    padding: 7px 10px;
}
.custom-select select::-ms-expand {
    display: none;
}

.custom-select select:hover, .custom-select select:focus {
    border-color: #00ffea;
    background-color: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 10px rgba(0, 255, 234, 0.15);
}

.custom-select select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Charts Tab */
.charts-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.chart-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    height: 400px;
    position: relative;
    overflow: hidden;
}

.chart-wrapper canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.chart-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-item span:first-child {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.stat-item span:last-child {
    font-weight: bold;
    color: #ecf0f1;
}

/* Quests Tab */
.quests-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.current-quest, .quest-log {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.current-quest h2, .quest-log h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #00d4ff;
}

#quest-title {
    color: #ecf0f1;
    margin-bottom: 15px;
}

#quest-description {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 20px;
}

.quest-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #ff6b6b);
    transition: width 0.3s ease;
}

.quest-rewards {
    color: #f39c12;
    font-weight: bold;
}

/* Make quest log scrollable */
#quest-log-items {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

#quest-log-items::-webkit-scrollbar {
    width: 8px;
}

#quest-log-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#quest-log-items::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 4px;
}

#quest-log-items::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.7);
}

/* Story Tab */
.story-container {
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-top: 20px;
    max-width: 1400px;
}

.story-progress {
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
}

.story-progress h2, .story-achievements h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #00d4ff;
}

.story-chapter h3 {
    color: #ecf0f1;
    margin-bottom: 15px;
}

.story-chapter p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 15px;
}

.story-objectives h4 {
    color: #f39c12;
    margin-bottom: 10px;
}

.story-objectives ul {
    list-style: none;
}

.story-objectives li {
    color: #bdc3c7;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.story-objectives li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2ecc71;
}

/* Skills Tab */
.skills-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-card h3 {
    color: #ecf0f1;
    margin-bottom: 15px;
}

.skill-level {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e67e22);
    transition: width 0.3s ease;
}

.skill-card p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 15px;
}

.skill-bonuses {
    color: #2ecc71;
    font-weight: bold;
}

.skill-points {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.skill-points h3 {
    color: #ecf0f1;
    margin-bottom: 15px;
}

.skill-upgrades {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-skill {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
}

/* News and Events */
.news-panel h3 {
    margin-bottom: 15px;
    color: #bdc3c7;
    font-size: 1.1rem;
}

.news-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #00d4ff;
    animation: slideIn 0.5s ease;
}

.event-item {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.2));
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

.modal h2 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-family: 'Orbitron', monospace;
}

.modal p {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #ecf0f1;
}

.level-rewards, .quest-rewards-display {
    text-align: left;
    margin-bottom: 25px;
}

.level-rewards h3, .quest-rewards-display h4 {
    color: #f39c12;
    margin-bottom: 10px;
}

.level-rewards ul, .quest-rewards-display ul {
    list-style: none;
    color: #ecf0f1;
}

.level-rewards li, .quest-rewards-display li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.event-choice {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-choice:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
}

.crypto-card.positive {
    animation: positiveGlow 0.5s ease;
}

.crypto-card.negative {
    animation: negativeGlow 0.5s ease;
}

@keyframes positiveGlow {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    100% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
}

@keyframes negativeGlow {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    100% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .character-grid {
        grid-template-columns: 1fr;
    }
    
    .terminal-layout {
        grid-template-columns: 1fr;
    }
    
    .trading-panel {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .quests-container {
        grid-template-columns: 1fr;
    }

    .story-container {
        padding: 20px 15px;
        margin-top: 15px;
    }
    
    .game-nav {
        flex-direction: column;
    }
    
    .nav-tab {
        margin-bottom: 5px;
    }
    
        .game-header {
        padding: 20px 15px;
    }

    .header-title-section h1 {
        font-size: 2.4rem;
        letter-spacing: 2px;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .header-left {
        text-align: center;
    }

    .player-stats {
        gap: 0.8rem;
        margin-top: 1rem;
    }

    .stat {
        flex: 1 1 160px;
        padding: 1.2rem 1rem 0.6rem 1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .stat-value {
        font-size: clamp(1.2rem, 4vw, 2.2rem);
    }

    .header-actions {
        justify-content: center;
    }

    #logout-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .trade-buttons {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .chart-controls {
        flex-direction: column;
    }
    
    .chart-stats {
        grid-template-columns: 1fr;
    }
    
    .skill-upgrades {
        flex-direction: column;
    }
    
    .indicator-grid {
        grid-template-columns: 1fr;
    }
    
    .crypto-option {
        flex-direction: column;
        text-align: center;
    }
    
    .crypto-indicators {
        flex-direction: row;
        justify-content: space-around;
        min-width: auto;
    }
    
    /* Skill Bonus Section Mobile */
    .skill-bonus-section {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 10px;
    }
    
    .skill-bonus-info {
        justify-content: center;
        text-align: center;
    }
    
    .skill-bonus-btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 0.85rem;
        white-space: normal;
        word-break: break-word;
    }
}

/* Perpetuals Terminal */
.perpetuals-terminal {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.perpetuals-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 600px;
}

/* Perpetuals Panel */
.perpetuals-panel {
    padding: 25px;
}

/* Perpetuals Selector */
.perpetuals-selector h3 {
    color: #bdc3c7;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.perpetuals-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.perpetual-option {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}

.perpetual-option:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.perpetual-option.active {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    animation: selectionPulse 0.6s ease-out;
}

.perpetual-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
    color: #f39c12;
    font-weight: bold;
}

.perpetual-info {
    flex: 1;
}

.perpetual-name {
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 5px;
}

.perpetual-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2ecc71;
    margin-bottom: 3px;
}

.perpetual-change {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 3px;
}

.perpetual-change.positive {
    color: #2ecc71;
}

.perpetual-change.negative {
    color: #e74c3c;
}

.perpetual-funding {
    font-size: 0.8rem;
    color: #f39c12;
    font-weight: bold;
}

/* Perpetuals Interface */
.perpetuals-interface {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.perpetuals-interface h3 {
    color: #bdc3c7;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.perpetuals-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.leverage-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.selected-perpetual-title {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
}

.selected-perpetual-title h4 {
    color: #00ff88;
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.selected-perpetual-title span {
    color: #ecf0f1;
    font-size: 1.1rem;
    font-weight: bold;
}

.leverage-selector label {
    color: #bdc3c7;
    font-size: 0.9rem;
    font-weight: bold;
}

.leverage-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.leverage-btn {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #bdc3c7;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: bold;
}

.leverage-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ecf0f1;
}

.leverage-btn.active {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    border-color: #f39c12;
}

.leverage-btn.locked {
    background: rgba(100, 100, 100, 0.2);
    color: #666;
    border-color: #444;
    cursor: not-allowed;
    opacity: 0.5;
}

.leverage-btn.locked:hover {
    background: rgba(100, 100, 100, 0.3);
    color: #777;
    transform: none;
}

/* Skill Bonus Section */
.skill-bonus-section {
    margin-top: 15px;
    padding: 12px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.skill-bonus-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-bonus-label {
    color: #00ff88;
    font-weight: bold;
    font-size: 0.9rem;
}

.skill-bonus-value {
    color: #ecf0f1;
    font-weight: bold;
    font-size: 1rem;
    padding: 2px 8px;
    background: rgba(0, 255, 136, 0.2);
    border-radius: 4px;
}

.skill-bonus-btn {
    padding: 8px 16px;
    background: linear-gradient(45deg, #00ff88, #00cc66);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.skill-bonus-btn:hover {
    background: linear-gradient(45deg, #00cc66, #00aa55);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 255, 136, 0.3);
}

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

.skill-bonus-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.skill-bonus-btn.remove-bonus {
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
    border: 1px solid #ff5252;
}

.skill-bonus-btn.remove-bonus:hover {
    background: linear-gradient(45deg, #ff5252, #ff4444);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
}

.perpetuals-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-long {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
}

.btn-short {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
}

.btn-long:hover, .btn-short:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.perpetuals-preview {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Open Positions */
.open-positions h3 {
    color: #bdc3c7;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

#positions-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.position-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.position-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.position-pair {
    font-weight: bold;
    color: #ecf0f1;
}

.position-details {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.position-pnl {
    font-weight: bold;
    font-size: 1.1rem;
}

.position-pnl.positive {
    color: #2ecc71;
}

.position-pnl.negative {
    color: #e74c3c;
}

/* Perpetuals Chart Panel */
.perpetuals-chart-panel {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Perpetuals Chart */
.perpetuals-chart-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.perpetuals-chart-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    height: 250px;
    position: relative;
    overflow: hidden;
}

.perpetuals-chart-wrapper canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

#perpetuals-mini-chart {
    width: 100% !important;
    height: 200px !important;
    display: block !important;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

/* Perpetuals Chart Section */
.perpetuals-chart-section {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.perpetuals-chart-section .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.perpetuals-chart-section .chart-header h4 {
    color: #ecf0f1;
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.perpetuals-chart-section .timeframe-selector {
    display: flex;
    gap: 5px;
}

.perpetuals-chart-section .timeframe-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #bdc3c7;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.perpetuals-chart-section .timeframe-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ecf0f1;
}

.perpetuals-chart-section .timeframe-btn.active {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.5);
    color: #00ff88;
}

.perpetuals-chart-section .chart-container {
    position: relative;
    height: 200px;
    width: 100%;
}

/* Perpetuals Market Data */
.perpetuals-market-data h3 {
    color: #bdc3c7;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.market-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.data-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.data-title {
    color: #bdc3c7;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: bold;
}

.data-value {
    color: #ecf0f1;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Perpetuals News */
.perpetuals-news h3 {
    color: #bdc3c7;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

#perpetuals-news-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.perpetual-news-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
    animation: slideIn 0.5s ease;
}

/* Enhanced News Items */
.news-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #00d4ff;
    animation: slideIn 0.5s ease;
    transition: all 0.3s ease;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.news-item .news-text {
    color: #ecf0f1;
    margin-bottom: 5px;
    line-height: 1.4;
}

.news-item .news-time {
    color: #bdc3c7;
    font-size: 0.8rem;
}

.news-item .news-impact {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-top: 5px;
}

.news-impact.positive {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.news-impact.negative {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.news-impact.neutral {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

/* Crypto Information Tooltips */
.crypto-option {
    position: relative;
}

.crypto-info-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(-10px);
}

.crypto-option:hover .crypto-info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.crypto-info-tooltip h4 {
    color: #00d4ff;
    margin-bottom: 10px;
    font-size: 1rem;
}

.crypto-info-tooltip p {
    color: #bdc3c7;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.crypto-info-tooltip .crypto-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.crypto-stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 6px;
    text-align: center;
}

.crypto-stat-label {
    font-size: 0.8rem;
    color: #bdc3c7;
    margin-bottom: 3px;
}

.crypto-stat-value {
    font-size: 1rem;
    color: #ecf0f1;
    font-weight: bold;
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .perpetuals-layout {
        grid-template-columns: 1fr;
    }
    
    .perpetuals-panel {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .leverage-buttons {
        justify-content: center;
    }
    
    .perpetuals-buttons {
        grid-template-columns: 1fr;
    }
    
    .market-data-grid {
        grid-template-columns: 1fr;
    }
    
    .crypto-info-tooltip {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 10px;
    }
    
    .crypto-option:hover .crypto-info-tooltip {
        transform: none;
    }
}

/* Individual Perpetuals Charts */
.individual-perpetuals-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.perpetual-chart-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.perpetual-chart-item h4 {
    color: #00ff88;
    margin: 0 0 10px 0;
    font-size: 14px;
    text-align: center;
}

.perpetual-chart-item canvas {
    width: 100% !important;
    height: 150px !important;
    display: block !important;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.name-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.name-input-group label {
    color: #fff;
    font-size: 1em;
    margin-bottom: 4px;
}

.name-input-group input[type="text"] {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #00d4ff;
    background: linear-gradient(145deg, #181c2b, #1a1e2f);
    color: #fff;
    font-size: 1em;
    outline: none;
    width: 200px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.name-input-group input[type="text"]:focus {
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3), 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
    background: linear-gradient(145deg, #1a1e2f, #1c2033);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 2;
}

#logout-btn {
    background: linear-gradient(135deg, 
        rgba(231, 76, 60, 0.8) 0%, 
        rgba(192, 57, 43, 0.9) 100%);
    color: white;
    padding: 12px 24px;
    border: 1px solid rgba(231, 76, 60, 0.4);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    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;
}

#logout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#logout-btn:hover::before {
    left: 100%;
}

#logout-btn:hover {
    background: linear-gradient(135deg, 
        rgba(231, 76, 60, 1) 0%, 
        rgba(192, 57, 43, 1) 100%);
    transform: translateY(-2px);
    border-color: rgba(231, 76, 60, 0.8);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(231, 76, 60, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.character-card[data-character="roller"] .character-avatar {
    font-size: 2.2em;
    color: #ffd700;
}
.character-card[data-character="sandbox"] .character-avatar {
    font-size: 2.2em;
    color: #00ff88;
}

/* Trading Performance Section */
.trading-performance-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trading-performance-section h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.performance-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.performance-card {
    background: linear-gradient(145deg, #1a1a1a, #141414);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.performance-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.performance-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.performance-content {
    flex: 1;
}

.performance-content h4 {
    color: #bdc3c7;
    font-size: 0.9rem;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.performance-value {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    margin-bottom: 5px;
}

.performance-value.positive {
    color: #2ecc71;
}

.performance-value.negative {
    color: #e74c3c;
}

.performance-label {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.performance-change {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 600;
}

.performance-change.positive {
    color: #2ecc71;
}

.performance-change.negative {
    color: #e74c3c;
}

.performance-stats {
    color: #95a5a6;
    font-size: 0.85rem;
    font-family: 'Roboto Mono', monospace;
}



.portfolio-container {
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-top: 20px;
    max-width: 1400px;
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.portfolio-header h2 {
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    margin: 0;
}

.portfolio-actions {
    display: flex;
    gap: 10px;
}

/* Portfolio Summary Cards */
.portfolio-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.2));
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.summary-card:hover::before {
    left: 100%;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 212, 255, 0.4);
}

.summary-icon {
    font-size: 2.5em;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid rgba(0, 212, 255, 0.3);
}

.summary-content {
    flex: 1;
}

.summary-content h3 {
    color: #bdc3c7;
    font-size: 0.9em;
    margin-bottom: 8px;
    font-weight: normal;
}

.summary-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 5px;
    font-family: 'Orbitron', monospace;
}

.summary-change {
    font-size: 0.9em;
    font-weight: bold;
}

.summary-change.positive {
    color: #00ff88;
}

.summary-change.negative {
    color: #ff4c4c;
}

.flex-pnl-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flex-pnl-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff7043);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.flex-pnl-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.flex-trade-btn {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flex-trade-btn:hover {
    background: linear-gradient(135deg, #00b8e6, #0088aa);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.flex-trade-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 212, 255, 0.3);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.section-header h3 {
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    margin: 0;
}

.timeframe-selector, .allocation-toggle {
    display: flex;
    gap: 5px;
}

.timeframe-btn {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #bdc3c7;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.timeframe-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

.timeframe-btn.active {
    background: #00d4ff;
    color: #181c2b;
    border-color: #00d4ff;
}

/* Performance Chart */
.performance-chart-container {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    text-align: center;
}

.performance-chart-container canvas {
    max-width: 100%;
    height: auto;
}

/* Asset Allocation */
.allocation-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.allocation-chart {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    text-align: center;
}

.allocation-chart canvas {
    max-width: 100%;
    height: auto;
}

.allocation-breakdown {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.allocation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.allocation-name {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ecf0f1;
}

.allocation-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.allocation-percentage {
    color: #00d4ff;
    font-weight: bold;
}

.allocation-value {
    color: #bdc3c7;
    font-size: 0.9em;
}

/* Table Controls */
.table-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #00d4ff;
    background: #181c2b;
    color: #fff;
    font-size: 0.9em;
    min-width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.sort-select, .filter-select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #00d4ff;
    background: #181c2b;
    color: #fff;
    font-size: 0.9em;
    cursor: pointer;
}

.sort-select:focus, .filter-select:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Enhanced Table Styling */
.table-container {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    overflow-x: auto;
}

.portfolio-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.portfolio-table th {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    font-family: 'Orbitron', monospace;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: help;
    position: relative;
}

.portfolio-table th:hover {
    background: rgba(0, 212, 255, 0.2);
}

.portfolio-table th::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.75em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
    text-transform: none;
    letter-spacing: normal;
    font-family: 'Arial', sans-serif;
    max-width: 200px;
    text-align: center;
}

.portfolio-table th:hover::after {
    opacity: 1;
}

.portfolio-table td {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
}

.portfolio-table tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.portfolio-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badge Styles */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.completed {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-badge.open {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.status-badge.closed {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.status-badge.cancelled {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Enhanced Portfolio Items */
#portfolio-items .portfolio-item {
    background: rgba(0,0,0,0.25);
    border: 1px solid #00d4ff33;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 10px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

#portfolio-items .portfolio-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateX(5px);
}

#portfolio-items .portfolio-item span:first-child {
    font-weight: bold;
    color: #00d4ff;
}

/* Action Buttons in Tables */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-btn {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
}

.btn-mini {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 6px;
    min-width: 35px;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Actions Cell Styling */
.actions-cell {
    padding: 8px !important;
    min-width: 200px;
}

.sell-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}

.quick-sell-buttons {
    display: flex;
    gap: 4px;
    justify-content: space-between;
}

.custom-sell {
    display: flex;
    gap: 4px;
    align-items: center;
}

.custom-sell-input {
    flex: 1;
    padding: 4px 6px;
    border: 1px solid var(--border-accent);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.75rem;
    min-width: 60px;
    max-width: 80px;
}

.custom-sell-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 4px var(--border-accent);
}

/* Sell Button Styles */
.btn-sell-25 {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
}

.btn-sell-25:hover {
    background: linear-gradient(135deg, #2980b9, #1f5582);
    transform: translateY(-1px);
}

.btn-sell-50 {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
}

.btn-sell-50:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-1px);
}

.btn-sell-75 {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
}

.btn-sell-75:hover {
    background: linear-gradient(135deg, #c0392b, #922b21);
    transform: translateY(-1px);
}

.btn-sell-all {
    background: linear-gradient(135deg, #8e44ad, #71368a);
    color: white;
    border: none;
    font-weight: bold;
}

.btn-sell-all:hover {
    background: linear-gradient(135deg, #71368a, #5b2c6f);
    transform: translateY(-1px);
}

.btn-custom-sell {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    font-weight: bold;
}

.btn-custom-sell:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.action-btn.danger {
    background: rgba(255, 76, 76, 0.2);
    border-color: rgba(255, 76, 76, 0.3);
    color: #ff4c4c;
}

.action-btn.danger:hover {
    background: rgba(255, 76, 76, 0.3);
}

/* Portfolio Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.analytics-card {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.analytics-card h4 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
    font-size: 1em;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.metric-label {
    color: #bdc3c7;
    font-size: 0.9em;
}

.metric-value {
    color: #ecf0f1;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
}

.metric-value.positive {
    color: #00ff88;
}

.metric-value.negative {
    color: #ff4c4c;
}

/* History Controls */
.history-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-container {
        padding: 20px 15px;
        margin-top: 15px;
    }
    
    .portfolio-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .portfolio-summary-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .summary-card {
        padding: 20px;
        gap: 15px;
    }
    
    .summary-icon {
        font-size: 2em;
        width: 50px;
        height: 50px;
    }
    
    .summary-value {
        font-size: 1.5em;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .allocation-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .table-controls, .history-controls {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .search-input, .sort-select, .filter-select {
        width: 100%;
        min-width: auto;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .portfolio-table {
        font-size: 0.8em;
    }
    
    .portfolio-table th, .portfolio-table td {
        padding: 8px 4px;
    }
    
    .actions-cell {
        min-width: 160px;
    }
    
    .quick-sell-buttons {
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .btn-mini {
        min-width: 30px;
        font-size: 0.65rem;
        padding: 3px 6px;
    }
    
    .custom-sell-input {
        max-width: 60px;
        min-width: 50px;
    }
    
    .timeframe-selector, .allocation-toggle {
        flex-wrap: wrap;
    }
    
    .timeframe-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

/* Quick Trade Sidebar */
.quick-trade-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: #1a1a1a;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s cubic-bezier(.4,2,.6,1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid #333;
}
.quick-trade-sidebar.active {
    right: 0;
}
.quick-trade-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 10px 22px;
    border-bottom: 1px solid #333;
    font-size: 1.3em;
    color: #ffffff;
    font-weight: 600;
}
.close-sidebar {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    margin-left: 10px;
}
.quick-trade-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 22px;
    /* Use calc to account for header height */
    max-height: calc(100vh - 80px);
}
.quick-section {
    margin-bottom: 28px;
}
.quick-section h4 {
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 1.1em;
    font-weight: 600;
}
#quick-spot-positions .portfolio-item,
#quick-perp-positions .position-item,
#quick-limit-orders .limit-order-item {
    background: #333;
    border: 1px solid #555;
    padding: 10px 14px;
    margin-bottom: 8px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.98em;
}
#quick-spot-positions .portfolio-item span:first-child {
    font-weight: bold;
}
#quick-perp-positions .position-pnl.positive {
    color: #00ff88;
}
#quick-perp-positions .position-pnl.negative {
    color: #ff4c4c;
}
#quick-order-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
#quick-order-form select,
#quick-order-form input {
    flex: 1 1 45%;
    padding: 6px 10px;
    border: 1px solid #555;
    background: #333;
    color: #fff;
    font-size: 1em;
}
#quick-order-form button {
    flex: 1 1 100%;
    margin-top: 6px;
}
#quick-order-preview {
    color: #00ff88;
    font-size: 0.98em;
    margin-top: 4px;
}
.open-quick-trade {
    position: fixed;
    right: 24px;
    bottom: 32px;
    z-index: 1100;
    background: #007acc;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 1.1em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.open-quick-trade:hover {
    background: #005a99;
    color: #ffffff;
}

/* Bank Tab */
.bank-container {
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-top: 20px;
    max-width: 100%;
    min-height: calc(100vh - 200px);
}

/* Bank Overview */
.bank-overview {
    margin-bottom: 30px;
}

.bank-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.bank-stat-card {
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    text-align: center;
    transition: all 0.3s ease;
}

.bank-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

.bank-stat-card h4 {
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.bank-stat-card .stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.bank-stat-card .stat-label {
    color: #bdc3c7;
    font-size: 0.9em;
}

/* Loan Types Section */
.loan-types-section {
    margin-bottom: 30px;
}

.loan-types-section h3 {
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    font-size: 1.4em;
    margin-bottom: 20px;
}

.loan-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.loan-type-card {
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.loan-type-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

.loan-type-card h4 {
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.loan-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loan-rate, .loan-limit, .loan-term, .loan-requirements {
    color: #ecf0f1;
    font-size: 0.95em;
}

.rate-value, .limit-value, .term-value {
    color: #00d4ff;
    font-weight: bold;
}

/* Current Loan Section */
.current-loan-section {
    margin-bottom: 30px;
}

.current-loan-section h3 {
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    font-size: 1.4em;
    margin-bottom: 20px;
}

.loan-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.loan-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.status-label {
    color: #bdc3c7;
    font-size: 0.9em;
}

.status-value {
    color: #00d4ff;
    font-weight: bold;
    font-size: 1em;
}

/* Loan Actions Section */
.loan-actions-section {
    margin-bottom: 30px;
}

.loan-actions-section h3 {
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    font-size: 1.4em;
    margin-bottom: 20px;
}

.loan-action-group {
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.loan-action-group h4 {
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.loan-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    color: #bdc3c7;
    font-size: 0.9em;
    font-weight: bold;
}

.loan-select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0,0,0,0.5);
    color: #ffffff;
    font-size: 1em;
    outline: none;
    transition: all 0.3s ease;
}

.loan-select:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.loan-select option {
    background: #181c2b;
    color: #ffffff;
}

.loan-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ecf0f1;
    font-size: 0.9em;
}

.preview-item span {
    color: #00d4ff;
    font-weight: bold;
}

.repay-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.partial-repay {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.partial-repay input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0,0,0,0.5);
    color: #ffffff;
    font-size: 1em;
    outline: none;
}

.partial-repay input:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.loan-history {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    padding: 10px;
    color: #bdc3c7;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

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

.history-date {
    color: #ecf0f1;
    font-size: 0.9em;
}

.history-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.history-entry span {
    color: #bdc3c7;
    font-size: 0.9em;
}

.history-action {
    color: #00d4ff !important;
    font-weight: bold;
}

.history-amount {
    color: #ffffff !important;
    font-weight: bold;
}

.history-rate {
    color: #ffcc00 !important;
}

.history-remaining {
    color: #00ff88 !important;
}

.bank-message {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    color: #00ff88;
    font-size: 1em;
    min-height: 20px;
}

/* Enhanced Bank Sections */
.bank-credit-section {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.bank-credit-section h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

.credit-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.credit-score {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.credit-score span {
    color: #ecf0f1;
    font-size: 1.1em;
}

.credit-score strong {
    color: #00d4ff;
    font-size: 1.2em;
}

#bank-credit-indicator {
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    padding: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.credit-rating {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.credit-description {
    color: #bdc3c7;
    font-size: 0.9em;
}

.credit-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credit-stats div {
    color: #ecf0f1;
    font-size: 1em;
}

.credit-stats span {
    color: #00d4ff;
    font-weight: bold;
}

.bank-section {
    margin-bottom: 18px;
    font-size: 1.1em;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.bank-section h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

.loan-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.loan-info div {
    color: #ecf0f1;
    font-size: 1em;
}

.loan-info span {
    color: #00d4ff;
    font-weight: bold;
}

.bank-actions-section {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.bank-actions-section h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

.bank-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loan-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-amount-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.quick-amount-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.loan-buttons {
    display: flex;
    gap: 10px;
}

#bank-loan-amount {
    flex: 1 1 60%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0,0,0,0.5);
    color: #ffffff;
    font-size: 1em;
    outline: none;
    transition: all 0.3s ease;
}

#bank-loan-amount:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

#bank-message {
    color: #00ff88;
    margin-top: 8px;
    min-height: 20px;
    padding: 10px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.bank-history-section {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.bank-history-section h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

.loan-history-container {
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    overflow: hidden;
}

.history-headers {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 212, 255, 0.1);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    font-weight: bold;
    color: #00d4ff;
    font-size: 0.9em;
}

.loan-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.loan-history-entry {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.loan-history-entry:hover {
    background: rgba(0, 212, 255, 0.05);
}

.loan-history-entry.borrow {
    border-left: 3px solid #00ff88;
}

.loan-history-entry.repay {
    border-left: 3px solid #ff6b6b;
}

.loan-history-entry .history-date {
    color: #bdc3c7;
    font-size: 0.8em;
}

.loan-history-entry .history-action {
    color: #ecf0f1;
    font-weight: bold;
}

.loan-history-entry .history-amount {
    color: #00d4ff;
    font-weight: bold;
}

.loan-history-entry .history-rate {
    color: #ffc107;
}

.loan-history-entry .history-remaining {
    color: #ecf0f1;
}

.no-history {
    padding: 20px;
    text-align: center;
    color: #bdc3c7;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .credit-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .loan-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .loan-buttons {
        flex-direction: column;
    }
    
    .history-headers,
    .loan-history-entry {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .history-headers {
        display: none;
    }
    
    .loan-history-entry {
        padding: 15px;
        border-left: none;
        border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    }
    
    .loan-history-entry.borrow {
        border-left: 3px solid #00ff88;
    }
    
    .loan-history-entry.repay {
        border-left: 3px solid #ff6b6b;
    }
    
    .quick-amounts {
        justify-content: center;
    }
    
    /* Enhanced Bank Mobile Styles */
    .bank-container {
        padding: 20px 15px;
        min-height: calc(100vh - 150px);
    }
    
    .bank-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .bank-stat-card {
        padding: 15px;
    }
    
    .bank-stat-card h4 {
        font-size: 1em;
    }
    
    .bank-stat-card .stat-value {
        font-size: 1.4em;
    }
    
    .loan-types-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .loan-type-card {
        padding: 15px;
    }
    
    .loan-status-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .loan-action-group {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .loan-preview {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .repay-options {
        gap: 10px;
    }
    
    .partial-repay {
        flex-direction: column;
        gap: 10px;
    }
    
    .partial-repay input {
        width: 100%;
    }
}

/* Leaderboard Tab */
.leaderboard-container {
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-top: 20px;
    max-width: 1400px;
    width: 100%;
}

.leaderboard-container h2 {
    color: #00d4ff;
    margin-bottom: 30px;
    font-family: 'Orbitron', monospace;
    text-align: center;
    font-size: 2.2rem;
}

/* Leaderboard Stats Overview */
.leaderboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.2));
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 212, 255, 0.4);
}

.stat-icon {
    font-size: 2.5em;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid rgba(0, 212, 255, 0.3);
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-content h4 {
    color: #bdc3c7;
    font-size: 0.9em;
    margin-bottom: 8px;
    font-weight: normal;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 5px;
    font-family: 'Orbitron', monospace;
}

.stat-subtext {
    font-size: 0.9em;
    color: #00ff88;
    font-weight: 600;
}

/* Leaderboard Sections */
.leaderboard-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.leaderboard-section {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.section-header h3 {
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    margin: 0;
    font-size: 1.5rem;
}

/* Filter Buttons */
.ranking-filters, .achievement-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #00d4ff;
    color: #181c2b;
    border-color: #00d4ff;
}

/* Main Leaderboard */
.leaderboard-main {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 80px 2fr 1.5fr 100px 120px 120px 100px;
    gap: 15px;
    background: rgba(0, 212, 255, 0.1);
    padding: 15px 20px;
    font-weight: bold;
    color: #00d4ff;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-body {
    max-height: 600px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 80px 2fr 1.5fr 100px 120px 120px 100px;
    gap: 15px;
    align-items: center;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    padding: 15px 20px;
    color: #ecf0f1;
    font-size: 1em;
    transition: all 0.3s ease;
}

.leaderboard-entry:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
}

.leaderboard-entry.me {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.4);
    font-weight: bold;
    color: #00d4ff;
}

.leaderboard-entry .rank {
    font-weight: bold;
    font-size: 1.2em;
    color: #f39c12;
}

.leaderboard-entry .rank.top-3 {
    font-size: 1.5em;
}

.leaderboard-entry .rank.rank-1 {
    color: #ffd700;
}

.leaderboard-entry .rank.rank-2 {
    color: #c0c0c0;
}

.leaderboard-entry .rank.rank-3 {
    color: #cd7f32;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.2em;
}

.player-details {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-weight: bold;
    color: #ecf0f1;
}

.player-title {
    font-size: 0.8em;
    color: #bdc3c7;
}

.portfolio-value {
    font-weight: bold;
    color: #00ff88;
    font-family: 'Orbitron', monospace;
}

.level-badge {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    text-align: center;
}

.trades-count {
    color: #ecf0f1;
    font-weight: 600;
}

.winrate {
    font-weight: bold;
}

.winrate.high {
    color: #00ff88;
}

.winrate.medium {
    color: #f39c12;
}

.winrate.low {
    color: #ff4c4c;
}

.player-badge {
    font-size: 1.5em;
}

/* Regional Rankings */
.region-selector {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0,0,0,0.5);
    color: #00d4ff;
    font-size: 1em;
    outline: none;
    transition: all 0.3s ease;
}

.region-selector:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.regional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.regional-card {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    text-align: center;
}

.regional-card h4 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

.regional-leader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.regional-leader .player-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.5em;
}

/* Achievement Showcase */
.achievement-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.achievement-card {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.achievement-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.achievement-title {
    color: #00d4ff;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Orbitron', monospace;
}

.achievement-player {
    color: #ecf0f1;
    font-weight: bold;
    margin-bottom: 8px;
}

.achievement-description {
    color: #bdc3c7;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.achievement-date {
    color: #f39c12;
    font-size: 0.8em;
    font-weight: 600;
}

/* Hall of Fame */
.hall-of-fame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.fame-card {
    background: rgba(0,0,0,0.4);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fame-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    transition: all 0.3s ease;
    opacity: 0;
}

.fame-card:hover::before {
    opacity: 1;
}

.fame-card.legendary {
    border: 2px solid #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(0,0,0,0.4));
}

.fame-card.epic {
    border: 2px solid #9b59b6;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.1), rgba(0,0,0,0.4));
}

.fame-card.rare {
    border: 2px solid #3498db;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(0,0,0,0.4));
}

.fame-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.fame-rank {
    font-size: 3em;
    margin-bottom: 15px;
}

.fame-title {
    color: #00d4ff;
    font-weight: bold;
    font-size: 1.3em;
    margin-bottom: 10px;
    font-family: 'Orbitron', monospace;
}

.fame-player {
    color: #ecf0f1;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 12px;
}

.fame-achievement {
    color: #bdc3c7;
    margin-bottom: 15px;
    line-height: 1.4;
}

.fame-date {
    color: #f39c12;
    font-size: 0.9em;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .leaderboard-container {
        padding: 20px 15px;
    }
    
    .leaderboard-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 2em;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .ranking-filters, .achievement-filters {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .leaderboard-header {
        grid-template-columns: 60px 2fr 1fr 80px 90px 90px 80px;
        gap: 8px;
        padding: 12px 15px;
        font-size: 0.8em;
    }
    
    .leaderboard-entry {
        grid-template-columns: 60px 2fr 1fr 80px 90px 90px 80px;
        gap: 8px;
        padding: 12px 15px;
        font-size: 0.9em;
    }
    
    .player-avatar {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
    
    .regional-grid, .achievement-showcase, .hall-of-fame-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .fame-card {
        padding: 20px;
    }
}

/* Guide Tab Styles */
.guide-container {
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-top: 20px;
    max-width: 1400px;
}

.guide-container h2 {
    color: #00d4ff;
    margin-bottom: 30px;
    font-family: 'Orbitron', monospace;
    text-align: center;
}

.guide-section {
    margin-bottom: 40px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.guide-section h3 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-family: 'Orbitron', monospace;
}

.guide-content h4 {
    color: #ecf0f1;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.guide-content p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 15px;
}

.guide-tips ul, .guide-content ul {
    list-style: none;
    padding-left: 0;
}

.guide-tips li, .guide-content li {
    color: #bdc3c7;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.guide-tips li::before, .guide-content li::before {
    content: '•';
    color: #00d4ff;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.trading-example, .leverage-example {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.example-box {
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.example-item {
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.example-item h6 {
    color: #00d4ff;
    margin-bottom: 10px;
}

.indicator-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.indicator-item {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.indicator-item h4 {
    color: #00d4ff;
    margin-bottom: 15px;
}

.indicator-levels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.level {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: center;
}

.level.low, .level.safe {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.level.medium, .level.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.level.high, .level.danger {
    background: rgba(255, 76, 76, 0.2);
    color: #ff4c4c;
    border: 1px solid rgba(255, 76, 76, 0.3);
}

.event-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.event-type {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.event-type h4 {
    color: #00d4ff;
    margin-bottom: 10px;
}

.event-strategy ul {
    margin-top: 15px;
}

.skills-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.skill-guide-item {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.skill-guide-item h4 {
    color: #00d4ff;
    margin-bottom: 15px;
}

.progression-tips {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.strategy-item {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.strategy-item h4 {
    color: #00d4ff;
    margin-bottom: 15px;
}

/* Market Analysis Tab Styles */
.market-analysis-container {
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-top: 20px;
    max-width: 1400px;
}

.market-analysis-container h2 {
    color: #00d4ff;
    margin-bottom: 30px;
    font-family: 'Orbitron', monospace;
    text-align: center;
}

.market-overview h3, .crypto-analysis h3, .market-news-analysis h3, .trading-signals h3 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-family: 'Orbitron', monospace;
}

.market-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.market-stat-card {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.market-stat-card h4 {
    color: #bdc3c7;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 0.9em;
    font-weight: bold;
}

.stat-change.positive {
    color: #00ff88;
}

.stat-change.negative {
    color: #ff4c4c;
}

.stat-label {
    color: #bdc3c7;
    font-size: 0.8em;
}

.sentiment-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 5px auto 0;
}

.sentiment-indicator.bullish {
    background: #00ff88;
}

.sentiment-indicator.bearish {
    background: #ff4c4c;
}

.crypto-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.crypto-analysis-card {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.analysis-header h4 {
    color: #00d4ff;
    margin: 0;
}

.analysis-score {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9em;
}

.analysis-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.metric-label {
    color: #bdc3c7;
    font-size: 0.9em;
}

.metric-value {
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.metric-value.positive {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.metric-value.negative {
    background: rgba(255, 76, 76, 0.2);
    color: #ff4c4c;
    border: 1px solid rgba(255, 76, 76, 0.3);
}

.metric-value.neutral {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.metric-value.safe {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.metric-value.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.analysis-summary h5, .analysis-recommendations h5 {
    color: #00d4ff;
    margin-bottom: 10px;
    font-size: 1em;
}

.analysis-summary p {
    color: #bdc3c7;
    line-height: 1.5;
    margin-bottom: 15px;
}

.analysis-recommendations ul {
    list-style: none;
    padding-left: 0;
}

.analysis-recommendations li {
    color: #bdc3c7;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.analysis-recommendations li::before {
    content: '•';
    color: #00d4ff;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.news-impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.news-impact-card {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.news-impact-card.positive {
    border-color: rgba(0, 255, 136, 0.3);
}

.news-impact-card.negative {
    border-color: rgba(255, 76, 76, 0.3);
}

.news-impact-card h4 {
    color: #00d4ff;
    margin-bottom: 15px;
    text-align: center;
}

.impact-examples {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.impact-example {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
}

.news-type {
    color: #bdc3c7;
    font-size: 0.9em;
}

.impact-effect {
    color: #ecf0f1;
    font-weight: bold;
    font-size: 0.9em;
}

.signals-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.signal-card {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.signal-card.buy {
    border-color: rgba(0, 255, 136, 0.3);
}

.signal-card.sell {
    border-color: rgba(255, 76, 76, 0.3);
}

.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.signal-type {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

.signal-card.buy .signal-type {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.signal-card.sell .signal-type {
    background: rgba(255, 76, 76, 0.2);
    color: #ff4c4c;
}

.signal-crypto {
    color: #00d4ff;
    font-weight: bold;
}

.signal-time {
    color: #bdc3c7;
    font-size: 0.8em;
}

.signal-content p {
    color: #bdc3c7;
    line-height: 1.5;
    margin-bottom: 15px;
}

.signal-metrics {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.signal-metrics span {
    color: #ecf0f1;
    font-size: 0.9em;
    background: rgba(0,0,0,0.2);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Settings Tab Styles */
.settings-container {
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-top: 20px;
    max-width: 1400px;
}

.settings-container h2 {
    color: var(--text-accent);
    margin-bottom: 30px;
    font-family: 'Orbitron', monospace;
    text-align: center;
}

.settings-section {
    margin-bottom: 40px;
    background: var(--bg-panel);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid var(--border-accent);
}

.settings-section h3 {
    color: var(--text-accent);
    margin-bottom: 25px;
    font-family: 'Orbitron', monospace;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.setting-item {
    background: var(--bg-panel);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-accent);
}

.setting-item label {
    display: block;
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.setting-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.setting-item select, .setting-item input[type="file"] {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--accent-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1em;
    margin-bottom: 10px;
}

.setting-item select:focus, .setting-item input[type="file"]:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 10px var(--border-accent);
}

.setting-description {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.4;
}

.btn-danger {
    background: linear-gradient(135deg, #ff4c4c, #ff6b6b);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff3333, #ff5252);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 76, 76, 0.4);
}

.about-content {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 20px;
}

.game-info h4 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

.game-info p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 20px;
}

.game-features h5, .game-stats h5 {
    color: #00d4ff;
    margin-bottom: 15px;
}

.game-features ul {
    list-style: none;
    padding-left: 0;
}

.game-features li {
    color: #bdc3c7;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.game-features li::before {
    content: '•';
    color: #00d4ff;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 350px;
}

.notification {
    background: rgba(0, 0, 0, 0.9);
    border-left: 4px solid #00d4ff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    color: #ecf0f1;
    font-family: 'Orbitron', monospace;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    border-left-color: #27ae60;
}

.notification.warning {
    border-left-color: #f39c12;
}

.notification.error {
    border-left-color: #e74c3c;
}

.notification.info {
    border-left-color: #3498db;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #00d4ff;
}

.notification-message {
    font-size: 0.9em;
    line-height: 1.4;
}

/* Head Outside Tab Styles */
.outside-container {
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-top: 20px;
    max-width: 1400px;
}

.outside-container h2 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-family: 'Orbitron', monospace;
    text-align: center;
}

.outside-intro {
    color: #bdc3c7;
    text-align: center;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.location-card {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 212, 255, 0.5);
}

.location-card h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

.location-card p {
    color: #bdc3c7;
    line-height: 1.5;
    margin-bottom: 20px;
}

.location-stats {
    display: flex;
    justify-content: space-around;
    gap: 15px;
}

.location-stats span {
    color: #ecf0f1;
    font-size: 0.9em;
    background: rgba(0,0,0,0.2);
    padding: 5px 10px;
    border-radius: 6px;
}

.cooldown-timer {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(192, 57, 43, 0.2));
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    text-align: center;
    animation: cooldownPulse 2s ease-in-out infinite;
}

@keyframes cooldownPulse {
    0%, 100% {
        opacity: 0.8;
        box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
    }
    50% {
        opacity: 1;
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    }
}

.cooldown-label {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.8rem;
    margin-right: 8px;
}

.cooldown-time {
    color: #ffffff;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    text-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
}

/* Modal Styles for Location */
#location-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

#location-modal .modal-content {
    background: #1a1a1a;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border: 1px solid #333;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.modal-header h3 {
    color: #ffffff;
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.close-modal {
    background: #333;
    border: 1px solid #555;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.close-modal:hover {
    background: #555;
}

#location-description {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

#location-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.location-action-btn {
    background: #333;
    border: 1px solid #555;
    color: #ffffff;
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.location-action-btn:hover {
    background: #555;
}

#location-result {
    background: #333;
    border: 1px solid #555;
    padding: 20px;
    margin-top: 20px;
}

#location-result h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

#result-content {
    color: #bdc3c7;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
}

.result-message {
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #555;
}

.result-message.positive {
    background: rgba(0, 128, 0, 0.1);
    border-color: #4CAF50;
}

.result-message.negative {
    background: rgba(255, 0, 0, 0.1);
    border-color: #f44336;
}

.result-message.neutral {
    background: rgba(128, 128, 128, 0.1);
    border-color: #9e9e9e;
}

/* Responsive Design for All Tabs */
@media (max-width: 768px) {
    .guide-container, .market-analysis-container, .settings-container, .outside-container {
        padding: 20px 15px;
        margin-top: 15px;
    }
    
    .guide-container h2, .market-analysis-container h2, .settings-container h2, .outside-container h2 {
        font-size: 1.5em;
    }
    
    .guide-section, .settings-section {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .market-stats-grid, .crypto-analysis-grid, .news-impact-grid, .signals-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .locations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .indicator-guide, .skills-guide, .strategy-grid, .event-types {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .example-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .location-stats {
        flex-direction: column;
        gap: 10px;
    }
} 

/* --- Quick Sell Buttons Improvements --- */
.quick-sell-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    justify-content: flex-end;
}
.btn-sell-percent, .btn-sell-initial {
    padding: 4px 10px;
    font-size: 0.92em;
    border-radius: 4px;
    border: 1px solid #00d4ff44;
    background: #181c2b;
    color: #00d4ff;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border 0.18s;
    min-width: 44px;
    font-weight: 500;
    margin-bottom: 2px;
}
.btn-sell-percent:hover, .btn-sell-initial:hover {
    background: #00d4ff;
    color: #181c2b;
    border: 1px solid #00d4ff;
}
.btn-sell-initial {
    background: #ffc107;
    color: #181c2b;
    border: 1px solid #ffc107;
    font-weight: bold;
    min-width: 54px;
}
.btn-sell-initial:hover {
    background: #ffb300;
    color: #fff;
    border: 1px solid #ffb300;
}

/* --- Quick Trade Sidebar Overlay Fix --- */
.quick-trade-sidebar {
    z-index: 1200 !important;
    box-shadow: 0 0 24px #00d4ff33;
}
.open-quick-trade {
    z-index: 1100 !important;
}

/* Hide open-quick-trade button when sidebar is open */
.quick-trade-sidebar.active ~ .open-quick-trade {
    display: none !important;
}

/* Hide Quick Trade button by default */
.open-quick-trade,
#quick-trade-sidebar {
    display: none;
}

/* Show Quick Trade button when game screen is active */
#game-screen.active ~ .open-quick-trade,
#game-screen.active ~ #quick-trade-sidebar {
    display: block !important;
}

/* Responsive improvements */
@media (max-width: 600px) {
  .quick-sell-buttons {
    gap: 4px;
    justify-content: center;
  }
  .btn-sell-percent, .btn-sell-initial {
    font-size: 0.88em;
    min-width: 36px;
    padding: 3px 6px;
  }
}

/* Enhanced Perpetuals Positions Layout */
.positions-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.summary-stat .stat-label {
    color: #bdc3c7;
    font-size: 0.8em;
    margin-bottom: 5px;
}

.summary-stat .stat-value {
    color: #00d4ff;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
    font-size: 1.1em;
}

.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.position-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.position-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    opacity: 0.7;
}

.position-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
}

.position-card.profitable::before {
    background: linear-gradient(90deg, #00ff88, #00d4ff);
}

.position-card.losing::before {
    background: linear-gradient(90deg, #ff4c4c, #ff6b6b);
}

.position-card.high-risk {
    border-color: rgba(255, 76, 76, 0.4);
    background: rgba(255, 76, 76, 0.05);
}

.position-card.high-risk::before {
    background: linear-gradient(90deg, #ff4c4c, #ff6b6b);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.position-pair {
    font-size: 1.2em;
    font-weight: bold;
    color: #ecf0f1;
    font-family: 'Orbitron', monospace;
}

.position-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-type.long {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.position-type.short {
    background: rgba(255, 76, 76, 0.2);
    color: #ff4c4c;
    border: 1px solid rgba(255, 76, 76, 0.3);
}

.position-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    color: #bdc3c7;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: #ecf0f1;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
}

.position-pnl-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 15px;
}

.pnl-amount {
    font-size: 1.3em;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
}

.pnl-amount.positive {
    color: #00ff88;
}

.pnl-amount.negative {
    color: #ff4c4c;
}

.pnl-percentage {
    font-size: 1.1em;
    font-weight: bold;
}

.pnl-percentage.positive {
    color: #00ff88;
}

.pnl-percentage.negative {
    color: #ff4c4c;
}

.position-actions {
    display: flex;
    gap: 10px;
}

.position-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-btn.close {
    background: rgba(255, 76, 76, 0.2);
    color: #ff4c4c;
    border: 1px solid rgba(255, 76, 76, 0.3);
}

.position-btn.close:hover {
    background: rgba(255, 76, 76, 0.3);
    transform: scale(1.05);
}

.position-btn.edit {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.position-btn.edit:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
}

.risk-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00ff88;
}

.risk-indicator.medium {
    background: #ffc107;
}

.risk-indicator.high {
    background: #ff4c4c;
    animation: pulse 2s infinite;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.pagination-btn {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-info {
    color: #bdc3c7;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
}

/* No Positions Message */
.no-positions {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px dashed rgba(0, 212, 255, 0.3);
}

.no-positions-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-positions h4 {
    color: #00d4ff;
    font-size: 1.5em;
    margin-bottom: 10px;
    font-family: 'Orbitron', monospace;
}

.no-positions p {
    color: #bdc3c7;
    margin-bottom: 25px;
    font-size: 1.1em;
}

/* Responsive Design for Positions */
@media (max-width: 768px) {
    .positions-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }
    
    .positions-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .position-card {
        padding: 15px;
    }
    
    .position-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .position-actions {
        flex-direction: column;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .summary-stat .stat-value {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .positions-summary {
        grid-template-columns: 1fr;
    }
    
    .position-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .position-pnl-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Enhanced Perpetuals Selection */
.perpetuals-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.search-container {
    position: relative;
    width: 100%;
}

.perp-search {
    width: 100%;
    padding: 12px 40px 12px 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ecf0f1;
    font-size: 14px;
    transition: all 0.3s ease;
}

.perp-search:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #00d4ff;
    font-size: 16px;
    pointer-events: none;
}

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #ecf0f1;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 150px;
}

.sort-select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.sort-select option {
    background: #1a1a1a;
    color: #ecf0f1;
    padding: 8px;
}

/* Themed Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.6), rgba(0, 212, 255, 0.3));
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.8), rgba(0, 212, 255, 0.5));
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.3);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.6) rgba(0, 0, 0, 0.3);
}

/* Specific scrollbar for perpetuals grid */
.perpetuals-options::-webkit-scrollbar {
    width: 10px;
}

.perpetuals-options::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.perpetuals-options::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.7), rgba(0, 212, 255, 0.4));
    border-radius: 5px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.perpetuals-options::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.9), rgba(0, 212, 255, 0.6));
}

/* Specific scrollbar for Quick Trade content */
.quick-trade-content::-webkit-scrollbar {
    width: 8px;
}

.quick-trade-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.quick-trade-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.8), rgba(0, 212, 255, 0.5));
    border-radius: 4px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.quick-trade-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(0, 212, 255, 1), rgba(0, 212, 255, 0.7));
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

/* Enhanced filter buttons for better layout */
.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    color: #bdc3c7;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
}

.filter-btn.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    color: #00d4ff;
}

.quick-selection {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.quick-selection h4 {
    color: #00d4ff;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #ecf0f1;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

.quick-btn.active {
    background: rgba(0, 212, 255, 0.25);
    border-color: #00d4ff;
    color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    animation: selectionPulse 0.6s ease-out;
}

@keyframes selectionPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    }
}

.perpetual-category {
    margin-bottom: 25px;
}

.category-title {
    color: #00d4ff;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.perpetual-option {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.perpetual-option:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateX(5px);
}

.perpetual-option.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    animation: selectionPulse 0.6s ease-out;
}

.perpetual-option.hidden {
    display: none;
}

.favorite-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 50%;
}

.favorite-btn:hover {
    color: #ffd700;
    transform: translateY(-50%) scale(1.2);
}

.favorite-btn.favorited {
    color: #ffd700;
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.3); }
    100% { transform: translateY(-50%) scale(1); }
}

/* Responsive design for filter row */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .sort-controls {
        justify-content: center;
    }
    
    .sort-select {
        min-width: 120px;
        font-size: 11px;
    }
    
    .filter-buttons {
        justify-content: center;
    }
}

/* Quest Progress Styles */
.quest-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.quest-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.quest-item h4 {
    color: #ecf0f1;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.quest-item p {
    color: #bdc3c7;
    margin-bottom: 10px;
    line-height: 1.4;
}

.quest-status {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    font-size: 0.9rem;
}

.quest-status.completed {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.quest-status.active {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
    animation: pulse 2s infinite;
}

.quest-status.locked {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

.quest-counter {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Enhanced Skills System */
.skills-details-container {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.skill-detail-card {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.skill-detail-card:hover {
    border-color: #007acc;
    box-shadow: 0 4px 16px rgba(0, 122, 204, 0.15);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.skill-header h3 {
    color: #00d4ff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.skill-level {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.skill-description {
    color: #bdc3c7;
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.skill-effects {
    margin-bottom: 20px;
}

.skill-effects h4 {
    color: #ecf0f1;
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.skill-effects ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-effects li {
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-effects li:last-child {
    border-bottom: none;
}

.skill-effects li.positive-effect {
    color: #27ae60;
}

.skill-effects li.neutral-effect {
    color: #95a5a6;
}

.skill-upgrade {
    text-align: center;
}

.skill-upgrade button {
    background: linear-gradient(135deg, #007acc, #005a9e);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
}

.skill-upgrade button:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a9e, #004080);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
}

.skill-upgrade button:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .skills-details-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .skill-detail-card {
        padding: 15px;
    }
    
    .skill-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .skill-effects li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

.skill-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.skill-bar {
    flex: 1;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress-text {
    color: #bdc3c7;
    font-size: 0.9em;
    min-width: 50px;
    text-align: right;
}

/* Story Achievements Styling - Badge Style */
#story-achievements-list {
    margin-top: 20px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    padding: 10px;
}

.achievement-badge {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.achievement-badge.locked {
    filter: grayscale(100%) brightness(0.6);
    opacity: 0.7;
}

.achievement-badge.unlocked {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    box-shadow: 0 0 15px rgba(39, 174, 96, 0.3);
}

.achievement-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.achievement-badge.locked:hover {
    filter: grayscale(80%) brightness(0.8);
    opacity: 0.9;
}

.achievement-badge.unlocked:hover {
    box-shadow: 0 5px 25px rgba(39, 174, 96, 0.4);
}

.achievement-icon {
    font-size: 2rem;
    line-height: 1;
    text-align: center;
}

.achievement-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    min-width: 200px;
    max-width: 250px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    backdrop-filter: blur(10px);
    margin-bottom: 10px;
}

.achievement-badge:hover .achievement-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.achievement-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
}

.tooltip-title {
    color: #ecf0f1;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
    text-align: center;
}

.tooltip-description {
    color: #bdc3c7;
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 8px;
    text-align: center;
}

.tooltip-status {
    color: #27ae60;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    padding: 4px 8px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.tooltip-status.locked {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
}

/* Responsive design for achievements */
@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 12px;
        padding: 8px;
    }
    
    .achievement-badge {
        width: 70px;
        height: 70px;
    }
    
    .achievement-icon {
        font-size: 1.8rem;
    }
    
    .achievement-tooltip {
        min-width: 180px;
        max-width: 220px;
        padding: 10px;
    }
    
    .tooltip-title {
        font-size: 0.9rem;
    }
    
    .tooltip-description {
        font-size: 0.8rem;
    }
}