/* Base Styles using Tailwind CSS Setup */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
    --primary: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

.number-font {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    letter-spacing: -0.5px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Utility Classes */
.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card {
    background: linear-gradient(145deg, #1e293b, #111827);
    border: 1px solid #334155;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 0 15px rgba(59, 130, 246, 0.1);
    border-color: #475569;
    transform: translateY(-2px);
}

/* Text Gradients */
.text-gradient-gold {
    background: linear-gradient(to right, #fbbf24, #d97706);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.live-pulse {
    animation: pulse-green 2s infinite;
}

@keyframes flashUp {
    0% {
        background-color: rgba(239, 68, 68, 0.4);
        color: white;
    }

    100% {
        background-color: transparent;
    }
}

@keyframes flashDown {
    0% {
        background-color: rgba(59, 130, 246, 0.4);
        color: white;
    }

    100% {
        background-color: transparent;
    }
}

.price-up-flash {
    animation: flashUp 1s ease-out;
}

.price-down-flash {
    animation: flashDown 1s ease-out;
}

.price-up {
    color: #ef4444 !important;
}

.price-down {
    color: #3b82f6 !important;
}

/* Tab Navigation */
.main-tab {
    position: relative;
    color: var(--text-secondary);
}

.main-tab.tab-active {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.main-tab.tab-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 2px;
    background: #3b82f6;
    border-radius: 2px;
    box-shadow: 0 0 8px #3b82f6;
}

/* Asset Table */
tr {
    transition: background-color 0.15s;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Interactive Elements */
.btn-buy {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-buy:active {
    transform: scale(0.95);
}

.btn-sell {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-sell:active {
    transform: scale(0.95);
}

/* Game Mode Cards */
.event-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.event-card:hover {
    background: #334155;
    transform: translateY(-2px);
}

.event-card.selected {
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.1);
    box-shadow: 0 0 0 1px #eab308;
}

/* Toast Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slideIn {
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Heatmap */
.heatmap-cell {
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
    cursor: pointer;
}

.heatmap-cell:hover {
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    pointer-events: none;
    z-index: 100;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

/* Custom Scrollbar Utility for specific containers */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 10px;
}