/* CSS Variables for Candle Colors */
    :root {
        --candle-up-color: #26a69a;
        --candle-down-color: #ef5350;
        --candle-up-border: #26a69a;
        --candle-down-border: #ef5350;
        --candle-wick-up: #26a69a;
        --candle-wick-down: #ef5350;
    }

    /* Candle Theme Classes */
    .chart-container.monochrome-theme,
    .chart-area.monochrome-theme {
        --candle-up-color: #ffffff;
        --candle-down-color: #333333;
        --candle-up-border: #cccccc;
        --candle-down-border: #666666;
        --candle-wick-up: #cccccc;
        --candle-wick-down: #666666;
    }

    .chart-container.colored-theme,
    .chart-area.colored-theme {
        --candle-up-color: #26a69a;
        --candle-down-color: #ef5350;
        --candle-up-border: #26a69a;
        --candle-down-border: #ef5350;
        --candle-wick-up: #26a69a;
        --candle-wick-down: #ef5350;
    }

    /* Apply variables to any candle elements */
    .candle.up,
    .candle-up {
        background-color: var(--candle-up-color) !important;
        border-color: var(--candle-up-border) !important;
    }

    .candle.down,
    .candle-down {
        background-color: var(--candle-down-color) !important;
        border-color: var(--candle-down-border) !important;
    }

    .candle-wick.up,
    .wick-up {
        background-color: var(--candle-wick-up) !important;
    }

    .candle-wick.down,
    .wick-down {
        background-color: var(--candle-wick-down) !important;
    }

    /* Tutorial Overlay Styles */
    .tutorial-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 10000;
        pointer-events: auto;
    }

    .tutorial-overlay.active {
        pointer-events: auto;
    }

    .tutorial-backdrop {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.85);
        pointer-events: none;
    }

    .tutorial-content {
        position: relative;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }

    .tutorial-header {
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 20px 30px;
        border-radius: 15px;
        text-align: center;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        pointer-events: all;
        min-width: 300px;
    }

    .tutorial-header h2 {
        margin: 0 0 10px 0;
        font-size: 1.5em;
        font-weight: 600;
    }

    .tutorial-header p {
        margin: 0 0 15px 0;
        opacity: 0.9;
    }

    .tutorial-progress {
        font-size: 1.1em;
        font-weight: 500;
    }

    .tutorial-step {
        position: relative;
        width: 100%;
        height: 100%;
    }

    /* Highlight Effect */
    .tutorial-highlight {
        position: fixed;
        border: 4px solid #00ff88;
        border-radius: 12px;
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.8), 0 0 60px rgba(0, 255, 136, 0.4);
        background: rgba(0, 255, 136, 0.15);
        z-index: 10001;
        animation: tutorialPulse 2s infinite;
        pointer-events: none;
    }

    @keyframes tutorialPulse {
        0%, 100% {
            transform: scale(1);
            box-shadow: 0 0 30px rgba(0, 255, 136, 0.8), 0 0 60px rgba(0, 255, 136, 0.4);
            border-color: #00ff88;
        }
        50% {
            transform: scale(1.03);
            box-shadow: 0 0 40px rgba(0, 255, 136, 1), 0 0 80px rgba(0, 255, 136, 0.6);
            border-color: #00ffaa;
        }
    }

    /* Arrow Styles */
    .tutorial-arrow {
        position: fixed;
        width: 0;
        height: 0;
        z-index: 10002;
        pointer-events: none;
    }

    .tutorial-arrow[data-position="top"]::before {
        content: '';
        position: absolute;
        width: 0;
        height: 0;
        border-left: 15px solid transparent;
        border-right: 15px solid transparent;
        border-bottom: 20px solid #667eea;
        top: -20px;
        left: -15px;
        animation: arrowBounce 1.5s ease-in-out infinite;
    }

    .tutorial-arrow[data-position="bottom"]::before {
        content: '';
        position: absolute;
        width: 0;
        height: 0;
        border-left: 15px solid transparent;
        border-right: 15px solid transparent;
        border-top: 20px solid #667eea;
        bottom: -20px;
        left: -15px;
        animation: arrowBounce 1.5s ease-in-out infinite;
    }

    @keyframes arrowBounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-5px); }
    }

    /* Tooltip Styles */
    .tutorial-tooltip {
        position: fixed;
        background: white;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
        max-width: 280px;
        min-width: 250px;
        z-index: 10003;
        pointer-events: auto;
    }

    .tutorial-tooltip h3 {
        margin: 0 0 10px 0;
        color: #333;
        font-size: 1.2em;
        font-weight: 600;
    }

    .tutorial-tooltip p {
        margin: 0 0 15px 0;
        color: #666;
        line-height: 1.5;
    }

    .tutorial-tooltip button {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 8px;
        cursor: pointer;
        font-weight: 500;
        transition: transform 0.2s;
        width: 100%;
        pointer-events: auto;
    }

    .tutorial-tooltip button:hover {
        transform: translateY(-2px);
    }

    /* Positioning */
    .tutorial-tooltip[data-position="top-center"] {
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-bottom: 30px;
    }

    .tutorial-tooltip[data-position="bottom-center"] {
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 30px;
    }

    .tutorial-tooltip[data-position="bottom-left"] {
        top: 100%;
        left: 0;
        margin-top: 30px;
    }

    .tutorial-tooltip[data-position="top-right"] {
        bottom: 100%;
        right: 0;
        margin-bottom: 30px;
    }

    .tutorial-tooltip[data-position="center"] {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    /* Demo Trading Navigation */
    .demo-trading-nav {
        position: fixed;
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 15px;
        z-index: 1000;
        background: rgba(11, 14, 17, 0.9);
        padding: 10px 20px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }

    .demo-nav-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        padding: 8px 16px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 0.9em;
        font-weight: 500;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .demo-nav-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .demo-nav-btn.home-btn {
        padding: 8px 12px;
    }

    .demo-nav-btn.emergency-reset-btn {
        background: linear-gradient(135deg, #ff6b6b, #ee5a52);
        color: white;
        border: 2px solid #ff6b6b;
        animation: emergencyPulse 2s ease-in-out infinite;
    }

    .demo-nav-btn.emergency-reset-btn:hover {
        background: linear-gradient(135deg, #ff5252, #e53e3e);
        border-color: #ff5252;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    }

    .demo-nav-btn.emergency-reset-btn small {
        background: rgba(255, 255, 255, 0.2);
        padding: 2px 6px;
        border-radius: 10px;
        font-size: 0.7em;
        margin-left: 5px;
    }

    @keyframes emergencyPulse {
        0%, 100% { box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3); }
        50% { box-shadow: 0 4px 20px rgba(255, 107, 107, 0.6); }
    }

    /* Stationary Reset Button */
    .stationary-reset-container {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
    }

    .stationary-reset-btn {
        background: linear-gradient(135deg, #FCD535, #f4c430);
        color: #0B0E11;
        border: 2px solid #FCD535;
        padding: 12px 20px;
        border-radius: 12px;
        cursor: pointer;
        font-weight: 600;
        font-size: 14px;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 12px rgba(252, 213, 53, 0.3);
    }

    .stationary-reset-btn:hover:not(:disabled) {
        background: linear-gradient(135deg, #f4c430, #FCD535);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(252, 213, 53, 0.4);
    }

    .stationary-reset-btn:disabled {
        background: linear-gradient(135deg, #666, #444) !important;
        color: #999 !important;
        cursor: not-allowed !important;
        opacity: 0.6 !important;
        border-color: #666 !important;
        transform: none !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    }

    .stationary-reset-btn small {
        background: rgba(11, 14, 17, 0.2);
        padding: 2px 6px;
        border-radius: 10px;
        font-size: 0.8em;
        margin-left: 5px;
    }

    /* Hide navigation in demo trading */
    .demo-trading-mode .top-bar {
        display: none !important;
    }

    .demo-trading-mode .bottom-nav {
        display: none !important;
    }

    .demo-trading-mode .main-nav {
        display: none !important;
    }

    .demo-trading-mode #trading-screen {
        height: 100vh;
        padding-top: 0;
    }

    /* Adjust demo trading screen positioning */
    .demo-trading-mode #demoTradingScreen {
        height: 100vh;
        padding-top: 60px; /* Space for our custom navigation */
    }

    /* Demo Trading Settings Panel */
    .demo-settings-panel {
        position: fixed;
        top: 15px;
        right: 20px;
        z-index: 1001;
    }

    .settings-toggle {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        padding: 10px 12px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.1em;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
    }

    .settings-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }

    .settings-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 10px;
        background: rgba(11, 14, 17, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 12px;
        padding: 15px;
        min-width: 280px;
        backdrop-filter: blur(20px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .settings-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .settings-header h4 {
        margin: 0;
        color: white;
        font-size: 1.1em;
        font-weight: 600;
    }

    .settings-item {
        margin-bottom: 15px;
    }

    .settings-item:last-child {
        margin-bottom: 0;
    }

    .settings-label {
        display: block;
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.9em;
        margin-bottom: 8px;
        font-weight: 500;
    }

    .settings-options {
        display: flex;
        gap: 8px;
    }

    .theme-btn {
        flex: 1;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        padding: 8px 12px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.85em;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .theme-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .theme-btn.active {
        background: rgba(102, 126, 234, 0.3);
        border-color: #667eea;
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
    }

    .theme-preview {
        display: flex;
        align-items: center;
    }

    .settings-action-btn {
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        padding: 10px 15px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 0.9em;
        font-weight: 500;
        transition: all 0.3s ease;
        text-align: left;
    }

    .settings-action-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(2px);
    }

    .settings-action-btn.danger:hover {
        background: rgba(246, 70, 93, 0.2);
        border-color: rgba(246, 70, 93, 0.5);
    }

    /* Settings Screen Styles */
    .settings-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 20px;
    }

    .settings-title {
        color: #F0B90B;
        font-size: 28px;
        margin-bottom: 30px;
        text-align: center;
    }

    .settings-section {
        background: linear-gradient(135deg, #1E2026, #14151B);
        border-radius: 16px;
        padding: 24px;
        margin-bottom: 20px;
        border: 1px solid rgba(240, 185, 11, 0.2);
    }

    .section-title {
        color: #F0B90B;
        font-size: 20px;
        margin-bottom: 20px;
        font-weight: 600;
    }

    .settings-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .settings-item:last-child {
        border-bottom: none;
    }

    .settings-item-label {
        color: #9CA3AF;
        font-size: 16px;
        flex: 1;
    }

    .settings-item-description {
        color: #6B7280;
        font-size: 13px;
        margin-top: 4px;
    }

    .settings-item-content {
        display: flex;
        align-items: center;
        gap: 12px;
        color: white;
        font-weight: 500;
    }

    .nickname-display {
        color: #FCD535;
        font-weight: 600;
        font-size: 16px;
    }

    .player-id-display {
        font-family: monospace;
        color: #6B7280;
        font-size: 13px;
    }

    .level-display {
        color: #4ADE80;
        font-weight: 600;
    }

    .settings-btn {
        background: linear-gradient(135deg, #F0B90B, #FCD535);
        color: #0B0E11;
        border: none;
        padding: 10px 20px;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        font-size: 14px;
        transition: transform 0.2s;
    }

    .settings-btn:hover {
        transform: scale(1.05);
    }

    /* Стили для ползунка громкости */
    input[type="range"] {
        -webkit-appearance: none;
        appearance: none;
        height: 6px;
        background: linear-gradient(90deg, rgba(252, 213, 53, 0.2), rgba(252, 213, 53, 0.4));
        border-radius: 3px;
        outline: none;
    }

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 18px;
        height: 18px;
        background: linear-gradient(135deg, #F0B90B, #FCD535);
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(252, 213, 53, 0.4);
        transition: transform 0.2s;
    }

    input[type="range"]::-webkit-slider-thumb:hover {
        transform: scale(1.2);
    }

    input[type="range"]::-moz-range-thumb {
        width: 18px;
        height: 18px;
        background: linear-gradient(135deg, #F0B90B, #FCD535);
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(252, 213, 53, 0.4);
        border: none;
        transition: transform 0.2s;
    }

    input[type="range"]::-moz-range-thumb:hover {
        transform: scale(1.2);
    }

    input[type="range"]:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    input[type="range"]:disabled::-webkit-slider-thumb {
        cursor: not-allowed;
    }

    input[type="range"]:disabled::-moz-range-thumb {
        cursor: not-allowed;
    }

    /* Стили для выбора аватара */
    .avatar-selector {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .current-avatar {
        font-size: 48px;
        width: 70px;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, rgba(252, 213, 53, 0.1), rgba(240, 185, 11, 0.1));
        border: 2px solid rgba(252, 213, 53, 0.3);
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(252, 213, 53, 0.2);
    }

    .avatar-picker-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        padding: 20px;
    }

    .avatar-picker-content {
        background: linear-gradient(135deg, #1E2026, #14151B);
        border-radius: 20px;
        padding: 30px;
        max-width: 500px;
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .avatar-picker-title {
        font-size: 24px;
        font-weight: 700;
        color: #FCD535;
        margin-bottom: 20px;
        text-align: center;
    }

    .avatar-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        margin-bottom: 20px;
    }

    .avatar-option {
        font-size: 40px;
        width: 70px;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        border: 2px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s;
    }

    .avatar-option:hover {
        background: rgba(252, 213, 53, 0.1);
        border-color: rgba(252, 213, 53, 0.5);
        transform: scale(1.1);
    }

    .avatar-option.selected {
        background: rgba(252, 213, 53, 0.2);
        border-color: #FCD535;
        box-shadow: 0 0 20px rgba(252, 213, 53, 0.4);
    }

    @media (max-width: 768px) {
        .avatar-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }

        .avatar-option {
            width: 60px;
            height: 60px;
            font-size: 35px;
        }

        .current-avatar {
            width: 60px;
            height: 60px;
            font-size: 40px;
        }
    }

    .danger-btn {
        background: linear-gradient(135deg, #EF4444, #DC2626);
        color: white;
    }

    .danger-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }

    /* Hall of Fame Styles */
    .hall-of-fame-screen {
        background: linear-gradient(135deg, #0B0E11 0%, #1a1a1a 50%, #2d1810 100%);
        color: white;
        overflow-y: auto;
        padding: 0;
        min-height: 100vh;
    }

    .hall-of-fame-container {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
        padding-bottom: 40px;
        min-height: 100vh;
    }

    /* Header Section */
    .hall-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 40px;
        padding: 20px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 16px;
        border: 1px solid rgba(252, 213, 53, 0.3);
    }

    .back-to-demo-btn {
        background: linear-gradient(135deg, #FCD535, #f4c430);
        border: none;
        color: #0B0E11;
        padding: 12px 20px;
        border-radius: 12px;
        cursor: pointer;
        font-weight: 600;
        font-size: 16px;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 12px rgba(252, 213, 53, 0.3);
    }

    .back-to-demo-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(252, 213, 53, 0.4);
        background: linear-gradient(135deg, #f4c430, #FCD535);
    }

    .hall-title {
        text-align: center;
        flex: 1;
    }

    .hall-title h1 {
        margin: 0;
        font-size: 2.5em;
        background: linear-gradient(135deg, #FCD535, #f4c430);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 0 0 20px rgba(252, 213, 53, 0.3);
        animation: titleGlow 3s ease-in-out infinite alternate;
    }

    @keyframes titleGlow {
        0% { text-shadow: 0 0 20px rgba(252, 213, 53, 0.3); }
        100% { text-shadow: 0 0 30px rgba(252, 213, 53, 0.6); }
    }

    .hall-subtitle {
        margin: 5px 0 0 0;
        color: rgba(255, 255, 255, 0.7);
        font-size: 1.1em;
        font-weight: 300;
    }

    .hall-stats {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: flex-end;
    }

    .stat-item {
        text-align: right;
        background: linear-gradient(145deg, rgba(11, 14, 17, 0.85), rgba(17, 21, 27, 0.7));
        border: 1px solid rgba(252, 213, 53, 0.2);
        border-radius: 16px;
        padding: 14px 18px;
        min-width: 160px;
        box-shadow: 0 12px 24px rgba(252, 213, 53, 0.15);
        backdrop-filter: blur(10px);
    }

    .stat-number {
        display: block;
        font-size: 1.6em;
        font-weight: 700;
        color: #FCD535;
        text-shadow: 0 0 12px rgba(252, 213, 53, 0.55);
    }

    .stat-label {
        display: block;
        font-size: 0.95em;
        color: rgba(255, 255, 255, 0.72);
        margin-top: 4px;
    }

    /* Podium Section */
    .podium-section {
        margin-bottom: 40px;
        background: radial-gradient(circle at center, rgba(252, 213, 53, 0.1) 0%, rgba(252, 213, 53, 0.05) 50%, transparent 100%);
        border-radius: 20px;
        padding: 40px 20px;
        position: relative;
        overflow: hidden;
    }

    .podium-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="sparkles" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23FCD535" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23sparkles)"/></svg>');
        animation: sparkle 8s linear infinite;
        pointer-events: none;
    }

    @keyframes sparkle {
        0% { transform: translateX(-20px) translateY(-20px); }
        100% { transform: translateX(20px) translateY(20px); }
    }

    .podium-container {
        display: flex;
        justify-content: center;
        align-items: flex-end;
        gap: 20px;
        position: relative;
        z-index: 1;
    }

    .podium-place {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        animation: podiumRise 2s ease-out;
    }

    @keyframes podiumRise {
        0% { transform: translateY(100px); opacity: 0; }
        100% { transform: translateY(0); opacity: 1; }
    }

    .podium-avatar {
        position: relative;
        margin-bottom: 15px;
    }

    .avatar-ring {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.05); }
    }

    .avatar-ring.gold {
        background: linear-gradient(135deg, #FFD700, #FFA500);
        border: 3px solid #FFD700;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }

    .avatar-ring.silver {
        background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
        border: 3px solid #C0C0C0;
        box-shadow: 0 0 20px rgba(192, 192, 192, 0.6);
    }

    .avatar-ring.bronze {
        background: linear-gradient(135deg, #CD7F32, #B5651D);
        border: 3px solid #CD7F32;
        box-shadow: 0 0 20px rgba(205, 127, 50, 0.6);
    }

    .avatar-emoji {
        font-size: 2.5em;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }

    .podium-medal {
        position: absolute;
        top: -10px;
        right: -10px;
        font-size: 2em;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        animation: bounce 2s ease-in-out infinite;
    }

    @media (max-width: 768px) {
        .podium-medal {
            font-size: 1.2em;
            top: -5px;
            right: -5px;
        }
    }

    @keyframes bounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-5px); }
    }

    .crown {
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.5em;
        animation: float 3s ease-in-out infinite;
    }

    @keyframes float {
        0%, 100% { transform: translateX(-50%) translateY(0); }
        50% { transform: translateX(-50%) translateY(-5px); }
    }

    .first-place .avatar-ring {
        width: 100px;
        height: 100px;
    }

    .first-place .avatar-emoji {
        font-size: 3em;
    }

    .podium-info {
        text-align: center;
        margin-bottom: 20px;
    }

    .podium-name {
        margin: 0 0 8px 0;
        font-size: 1.2em;
        font-weight: 700;
        color: white;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .first-place .podium-name {
        font-size: 1.4em;
        color: #FFD700;
    }

    .podium-value {
        font-size: 1.1em;
        font-weight: 600;
        color: #4CAF50;
        margin-bottom: 4px;
    }

    .podium-profit {
        font-size: 0.9em;
        color: rgba(255, 255, 255, 0.7);
    }

    .podium-base {
        width: 120px;
        border-radius: 8px 8px 0 0;
        position: relative;
    }

    .podium-base.first {
        height: 100px;
        background: linear-gradient(135deg, #FFD700, #FFA500);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    }

    .podium-base.second {
        height: 80px;
        background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
        box-shadow: 0 0 15px rgba(192, 192, 192, 0.4);
    }

    .podium-base.third {
        height: 60px;
        background: linear-gradient(135deg, #CD7F32, #B5651D);
        box-shadow: 0 0 15px rgba(205, 127, 50, 0.4);
    }

    /* Tabs Section */
    .hall-tabs {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-bottom: 30px;
        padding: 0 20px;
        flex-wrap: wrap;
    }

    .hall-tab {
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.2);
        color: white;
        padding: 12px 24px;
        border-radius: 12px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
        min-width: 140px;
        text-align: center;
    }

    .hall-tab.active {
        background: linear-gradient(135deg, #FCD535, #f4c430);
        color: #0B0E11;
        border-color: #FCD535;
        box-shadow: 0 4px 15px rgba(252, 213, 53, 0.4);
        transform: translateY(-2px);
    }

    .hall-tab:not(.active):hover {
        background: rgba(252, 213, 53, 0.1);
        border-color: rgba(252, 213, 53, 0.5);
        color: #FCD535;
    }

    @media (max-width: 820px) {
        .hall-header {
            flex-direction: column;
            align-items: stretch;
            text-align: center;
            gap: 20px;
        }

        .hall-title {
            order: 1;
        }

        .hall-stats {
            width: 100%;
            flex-direction: row;
            justify-content: center;
            align-items: stretch;
            gap: 12px;
        }

        .stat-item {
            flex: 1 1 45%;
            min-width: 0;
            text-align: center;
            padding: 12px 14px;
        }

        .hall-tabs {
            padding: 0;
        }

        .hall-tab {
            flex: 1 1 100%;
        }
    }

    /* Main Leaderboard */
    .hall-leaderboard {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 16px;
        border: 1px solid rgba(252, 213, 53, 0.3);
        overflow: hidden;
        margin-bottom: 30px;
    }

    .leaderboard-header {
        display: grid;
        grid-template-columns: 80px 1fr 120px 120px;
        gap: 15px;
        padding: 20px;
        background: rgba(252, 213, 53, 0.1);
        border-bottom: 1px solid rgba(252, 213, 53, 0.3);
        font-weight: 600;
        color: #FCD535;
        text-transform: uppercase;
        font-size: 0.9em;
        letter-spacing: 0.5px;
    }

    .leaderboard-list {
        max-height: 600px;
        overflow-y: auto;
    }

    .leaderboard-entry {
        display: grid;
        grid-template-columns: 80px 1fr 120px 120px;
        gap: 15px;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        align-items: center;
    }

    .leaderboard-entry:hover {
        background: rgba(252, 213, 53, 0.1);
        transform: translateX(5px);
    }

    .entry-rank {
        font-weight: 700;
        font-size: 1.1em;
        color: #FCD535;
        text-align: center;
    }

    .entry-trader {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .trader-avatar {
        font-size: 1.5em;
        width: 35px;
        height: 35px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid rgba(252, 213, 53, 0.3);
    }

    .trader-name {
        font-weight: 600;
        color: white;
    }

    .entry-value {
        font-weight: 600;
        color: #4CAF50;
        text-align: right;
    }

    .entry-change {
        font-weight: 500;
        text-align: right;
        font-size: 0.9em;
    }

    .entry-change.positive {
        color: #4CAF50;
    }

    .entry-change.negative {
        color: #f44336;
    }

    /* Your Position Card */
    .your-position-card {
        background: linear-gradient(135deg, rgba(252, 213, 53, 0.2), rgba(252, 213, 53, 0.1));
        border: 2px solid rgba(252, 213, 53, 0.5);
        border-radius: 16px;
        padding: 20px;
        animation: yourPositionGlow 3s ease-in-out infinite alternate;
    }

    @keyframes yourPositionGlow {
        0% { box-shadow: 0 0 10px rgba(252, 213, 53, 0.3); }
        100% { box-shadow: 0 0 25px rgba(252, 213, 53, 0.6); }
    }

    .position-header {
        text-align: center;
        margin-bottom: 20px;
    }

    .position-header h3 {
        margin: 0;
        color: #FCD535;
        font-size: 1.3em;
        font-weight: 700;
    }

    .position-content {
        display: flex;
        align-items: stretch;
        gap: 24px;
        flex-wrap: wrap;
    }

    .position-rank {
        font-size: 2.5em;
        font-weight: 700;
        color: #FCD535;
        text-shadow: 0 0 10px rgba(252, 213, 53, 0.5);
        min-width: 80px;
        text-align: center;
    }

    .position-info {
        flex: 1;
        display: flex;
        align-items: flex-start;
        gap: 20px;
        min-width: 220px;
    }

    .position-avatar {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: rgba(252, 213, 53, 0.15);
        border: 1px solid rgba(252, 213, 53, 0.35);
        font-size: 1.4em;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .position-details {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .position-name-row {
        display: flex;
        align-items: baseline;
        gap: 10px;
    }

    .position-name {
        font-size: 1.2em;
        font-weight: 600;
        color: white;
        margin: 0;
    }

    .position-stats {
        display: flex;
        gap: 18px;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .position-stat {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 10px 14px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(252, 213, 53, 0.16);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
        min-width: 120px;
    }

    .position-stat-label {
        font-size: 0.75em;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: rgba(255, 255, 255, 0.6);
    }

    .position-divider {
        width: 1px;
        min-height: 48px;
        background: linear-gradient(180deg, rgba(252, 213, 53, 0) 0%, rgba(252, 213, 53, 0.7) 50%, rgba(252, 213, 53, 0) 100%);
        align-self: stretch;
    }

    .position-balance {
        font-weight: 600;
        color: #4CAF50;
        font-size: 1.1em;
    }

    .position-pnl {
        font-weight: 600;
        font-size: 1.1em;
    }

    .position-pnl.positive {
        color: #4CAF50;
    }

    .position-pnl.negative {
        color: #f44336;
    }

    .position-progress {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        min-width: 190px;
        gap: 12px;
    }

    .progress-meta {
        display: flex;
        flex-direction: column;
        gap: 6px;
        text-align: right;
    }

    .progress-value {
        font-weight: 600;
        font-size: 1.1em;
        color: #FCD535;
    }

    .progress-text {
        display: block;
        font-size: 0.85em;
        color: rgba(255, 255, 255, 0.65);
    }

    .progress-bar {
        width: 100%;
        height: 8px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        overflow: hidden;
        margin-bottom: 5px;
    }

    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #FCD535, #4CAF50);
        border-radius: 4px;
        transition: width 0.3s ease;
    }

    /* Responsive Design */
    @media (max-width: 768px) {
        .hall-header {
            flex-direction: column;
            gap: 20px;
            text-align: center;
        }

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

        .position-info {
            flex-direction: column;
            align-items: stretch;
            gap: 16px;
        }

        .position-progress {
            align-items: stretch;
        }

        .progress-meta {
            text-align: left;
            align-items: flex-start;
        }

        .position-divider {
            display: none;
        }

        .podium-container {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            align-items: end;
            justify-items: center;
            gap: 16px;
        }

        .podium-place {
            order: initial;
        }

        .first-place {
            grid-column: 2;
        }

        .second-place {
            grid-column: 1;
        }

        .third-place {
            grid-column: 3;
        }

        .avatar-ring {
            width: 70px;
            height: 70px;
        }

        .podium-base {
            width: 90px;
        }

        .podium-base.first {
            height: 80px;
        }

        .podium-base.second {
            height: 65px;
        }

        .podium-base.third {
            height: 55px;
        }

        .podium-info {
            text-align: center;
        }

        .leaderboard-header,
        .leaderboard-entry {
            grid-template-columns: 60px 1fr 100px;
            gap: 10px;
        }

        .change-header,
        .entry-change {
            display: none;
        }

        .position-content {
            flex-direction: column;
            text-align: center;
            gap: 15px;
        }

        .position-info {
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .position-avatar {
            width: 40px;
            height: 40px;
        }

        .position-details {
            align-items: center;
        }

        .position-stats {
            justify-content: center;
        }
    }
