/* HUD Styles - Madness Combat Theme */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

* { box-sizing: border-box; }

html, body { 
    margin: 0; 
    padding: 0;
    overflow: hidden; 
    background: #000; 
    font-family: 'Courier Prime', monospace; 
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    color: #fff;
}

canvas { display: block; position: absolute; top: 0; left: 0; z-index: 1; }

#ui { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    pointer-events: none; 
    display: none; 
    z-index: 10; 
}

/* Madness Style Utilities */
.madness-panel {
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #333;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    position: relative;
}

.madness-panel::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border: 1px solid #666;
    pointer-events: none;
    z-index: 1;
}

.madness-text {
    font-family: 'Impact', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #000;
}

.madness-red { color: #f00; }
.madness-grey { color: #aaa; }

/* HUD Elements */
#ammo-display { 
    position: absolute;
    bottom: 30px; 
    right: 30px; 
    font-family: 'Impact', sans-serif;
    font-size: 48px; 
    color: #fff;
    text-shadow: 3px 3px 0 #000;
    text-align: right; 
}
#ammo-display span { font-size: 24px; color: #aaa; }

#hp-display { 
    position: absolute;
    bottom: 30px; 
    left: 30px; 
    font-family: 'Impact', sans-serif;
    font-size: 48px; 
    color: #f00;
    text-shadow: 3px 3px 0 #000;
}

#ping-display { 
    position: absolute;
    top: 10px; 
    right: 10px; 
    font-size: 12px; 
    color: #666; 
    font-weight: bold;
}

#weapon-name { 
    position: absolute;
    bottom: 80px; 
    right: 30px; 
    font-family: 'Courier Prime', monospace;
    font-size: 18px; 
    color: #f00; 
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: #000;
    padding: 2px 5px;
}

/* Weapon Selection HUD */
#weapon-slots { 
    position: absolute; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    gap: 15px; 
}

.weapon-slot { 
    width: 70px; 
    height: 70px; 
    background: #111; 
    border: 2px solid #333; 
    position: relative; 
    transition: all 0.1s;
    transform: skew(-5deg);
}

.weapon-slot.active { 
    border-color: #f00; 
    background: #200; 
    transform: skew(-5deg) scale(1.1); 
    box-shadow: 0 0 15px rgba(255,0,0,0.3);
    z-index: 2;
}

.slot-content { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 24px; 
    color: #444; 
    transform: skew(5deg); /* Counter-skew content */
}

.weapon-slot.active .slot-content { color: #fff; }

.slot-number {
    position: absolute;
    top: 2px;
    left: 5px;
    font-size: 12px;
    color: #666;
    font-weight: bold;
    transform: skew(5deg);
}
.weapon-slot.active .slot-number { color: #f00; }

/* Rust/Madness UI Container */
#rust-ui {
    display: none; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 900px; 
    height: 620px; 
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%); 
    border: 2px solid #1a1a1a; 
    flex-direction: column; 
    font-family: 'Rajdhani', sans-serif; 
    z-index: 1000; 
    pointer-events: auto;
    box-shadow: 
        0 0 60px rgba(0, 0, 0, 0.9),
        0 0 100px rgba(255, 10, 10, 0.1),
        inset 0 0 100px rgba(0, 0, 0, 0.5);
    clip-path: polygon(
        0 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% 100%,
        20px 100%,
        0 calc(100% - 20px)
    );
}

#rust-ui::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        linear-gradient(90deg, rgba(255, 10, 10, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 10, 10, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}

#rust-ui::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(
        180deg,
        rgba(255, 10, 10, 0.05) 0%,
        transparent 30%,
        transparent 70%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* UI Header */
.rust-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: linear-gradient(90deg, rgba(255, 10, 10, 0.1) 0%, transparent 50%, rgba(255, 10, 10, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 10, 10, 0.3); 
    padding: 18px 25px;
    position: relative;
    z-index: 1;
}

.rust-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ff0a0a, transparent);
}

.rust-title {
    font-family: 'Orbitron', sans-serif;
    color: #fff; 
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 10, 10, 0.5);
}
.rust-title span { 
    color: #ff0a0a;
    text-shadow: 0 0 30px rgba(255, 10, 10, 0.8);
}

.rust-close-hint {
    font-family: 'Share Tech Mono', monospace;
    color: #666; 
    font-size: 11px; 
    letter-spacing: 2px;
}

/* Tabs */
.rust-tabs {
    display: flex; 
    gap: 2px; 
    background: #0a0a0a;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.rust-tab { 
    background: transparent; 
    border: none;
    border-bottom: 2px solid transparent; 
    color: #555; 
    padding: 14px 24px; 
    cursor: pointer; 
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
}

.rust-tab:hover { 
    color: #fff;
    background: rgba(255, 10, 10, 0.05);
}

.rust-tab.active { 
    color: #ff0a0a;
    border-bottom-color: #ff0a0a;
    background: rgba(255, 10, 10, 0.1);
    text-shadow: 0 0 20px rgba(255, 10, 10, 0.5);
}

.rust-tab.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #ff0a0a;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff0a0a;
}

/* Content Area */
#rust-content {
    flex: 1; 
    overflow-y: auto; 
    padding: 20px 25px; 
    position: relative;
    z-index: 1;
    background: transparent;
}

/* Inventory Grid */
.rust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.rust-slot { 
    border: 1px solid #2a2a2a; 
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%); 
    height: 95px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    position: relative; 
    transition: all 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.rust-slot::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255, 10, 10, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.2s;
}

.rust-slot:hover { 
    border-color: #ff0a0a; 
    background: linear-gradient(135deg, #1f1f1f 0%, #111 100%);
    box-shadow: 0 0 20px rgba(255, 10, 10, 0.15);
}

.rust-slot:hover::before { opacity: 1; }

.rust-slot.selected { 
    border-color: #ff0a0a; 
    box-shadow: 0 0 25px rgba(255, 10, 10, 0.3), inset 0 0 20px rgba(255, 10, 10, 0.1);
}

.rust-slot.empty { opacity: 0.6; }

.drag-over { 
    border-color: #fff !important; 
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

/* Crafting List */
.rust-recipe { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 12px 15px; 
    background: linear-gradient(90deg, #1a1a1a 0%, #111 100%); 
    border: 1px solid #2a2a2a;
    border-left: 3px solid #333; 
    margin-bottom: 8px; 
    cursor: pointer; 
    transition: all 0.2s ease;
}

.rust-recipe:hover { 
    background: linear-gradient(90deg, #222 0%, #1a1a1a 100%); 
    border-left-color: #ff0a0a;
    transform: translateX(5px);
}

.rust-recipe.unavailable { opacity: 0.4; filter: grayscale(1); }
.rust-recipe.cant-afford { border-left-color: #500; opacity: 0.6; }

.recipe-btn {
    background: linear-gradient(135deg, #ff0a0a 0%, #cc0000 100%);
    color: #fff;
    border: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.2s;
    clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
}

.recipe-btn:hover {
    background: linear-gradient(135deg, #ff3333 0%, #ff0a0a 100%);
    box-shadow: 0 0 15px rgba(255, 10, 10, 0.5);
}

.recipe-btn:disabled { 
    background: #222; 
    color: #555; 
    cursor: not-allowed;
    box-shadow: none;
}

/* Team List */
.rust-player { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 12px 15px; 
    background: linear-gradient(90deg, #1a1a1a 0%, #111 100%); 
    border: 1px solid #2a2a2a;
    border-left: 3px solid #444; 
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.rust-player:hover {
    background: linear-gradient(90deg, #222 0%, #1a1a1a 100%);
    transform: translateX(3px);
}

.rust-player.teammate { 
    border-left-color: #00ff00;
    background: linear-gradient(90deg, rgba(0, 255, 0, 0.05) 0%, #111 100%);
}

.rust-player.enemy { 
    border-left-color: #ff0a0a;
    background: linear-gradient(90deg, rgba(255, 10, 10, 0.05) 0%, #111 100%);
}

/* Chat */
#chat-container { 
    position: absolute; 
    bottom: 120px; 
    left: 20px; 
    width: calc(100vw / 3 - 40px); 
    max-width: 33.33vw;
    max-height: 50vh;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

#chat-messages {
    max-height: calc(50vh - 50px);
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: auto;
}

.chat-message { 
    font-size: 14px; 
    background: rgba(0,0,0,0.5);
    padding: 2px 5px;
    margin-bottom: 2px;
    border-left: 2px solid #333;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}
.chat-message .player-name { color: #f00; font-weight: bold; }

#chat-input { 
    width: 100%; 
    padding: 8px; 
    background: rgba(0,0,0,0.8); 
    border: 1px solid #333; 
    color: #fff; 
    font-family: 'Courier Prime', monospace;
    outline: none; 
}
#chat-input:focus { border-color: #f00; }

/* Scrollbars */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { 
    background: linear-gradient(180deg, #333 0%, #222 100%); 
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { 
    background: linear-gradient(180deg, #ff0a0a 0%, #aa0000 100%); 
}

/* Drag Ghost */
.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 2000;
    opacity: 0.8;
    transform: scale(1.1);
}

/* Zone/Compass */
#zone-info {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Impact', sans-serif;
    font-size: 24px;
    color: #f00;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 2px;
}

/* --- RESTORED / FIXED MENUS --- */

/* ESC Menu (Settings) */
#settings-menu { 
    display: none; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 420px; 
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%); 
    border: 2px solid #1a1a1a; 
    box-shadow: 
        0 0 60px rgba(0, 0, 0, 0.9),
        0 0 100px rgba(255, 10, 10, 0.1);
    padding: 25px; 
    color: #fff; 
    z-index: 2000; 
    pointer-events: auto; 
    flex-direction: column;
    font-family: 'Rajdhani', sans-serif;
    clip-path: polygon(
        0 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

#settings-menu::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        linear-gradient(90deg, rgba(255, 10, 10, 0.02) 1px, transparent 1px),
        linear-gradient(rgba(255, 10, 10, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

/* Respawn UI */
#respawn-ui { 
    display: none; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.9); 
    justify-content: center; 
    align-items: center; 
    flex-direction: column; 
    pointer-events: auto; 
    z-index: 2000;
}

/* Spectator UI */
#spectator-ui { 
    display: none; 
    position: absolute; 
    bottom: 100px; 
    width: 100%; 
    text-align: center; 
    color: #aaa; 
    font-size: 18px; 
    font-family: 'Impact', sans-serif;
}

/* Connection status */
#connection-status {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.9);
    color: #ff0;
    padding: 20px 40px;
    border: 2px solid #ff0;
    font-size: 18px;
    z-index: 3000;
    text-align: center;
}

#connection-status.error { border-color: #f00; color: #f00; }
#connection-status.reconnecting { border-color: #ff0; color: #ff0; }

/* Day/Night Compass (Top) */
#day-night-hud {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

#compass-container {
    width: 300px;
    height: 30px;
    overflow: hidden;
    position: relative;
    background: rgba(0,0,0,0.5);
    border: 1px solid #666;
    margin-bottom: 5px;
}

#compass-strip {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    color: white;
    font-family: monospace;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

#compass-arrow {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    color: #f00;
    font-size: 20px;
}

#night-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(0,0,0,0) 20%, rgba(0,0,0,0.95) 80%);
    opacity: 0;
    transition: opacity 2s;
    z-index: 5;
    mix-blend-mode: multiply;
}

/* Radar HUD - Madness Combat Style */
#radar-container {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.9);
    border: 3px solid #333;
    box-shadow: 
        0 0 15px rgba(255, 0, 0, 0.15),
        inset 0 0 30px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    z-index: 20;
}

#radar-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

#radar-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    z-index: 2;
}

/* ============================================
   HUD ANIMATIONS - Madness Combat Style
   ============================================ */

/* Ammo shake animation */
@keyframes ammo-shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-3px) rotate(-1deg); }
    20% { transform: translateX(3px) rotate(1deg); }
    30% { transform: translateX(-3px) rotate(-1deg); }
    40% { transform: translateX(3px) rotate(1deg); }
    50% { transform: translateX(-2px); }
    60% { transform: translateX(2px); }
    70% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
    90% { transform: translateX(0); }
}

#ammo-display.shaking {
    animation: ammo-shake 0.4s ease-out;
    color: #f00 !important;
}

#ammo-display.low-ammo {
    color: #f00 !important;
    text-shadow: 3px 3px 0 #000, 0 0 10px rgba(255, 0, 0, 0.5);
}

/* HP Animations */
@keyframes hp-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes hp-critical-pulse {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 3px 3px 0 #000;
    }
    50% { 
        transform: scale(1.15);
        text-shadow: 3px 3px 0 #000, 0 0 20px #f00, 0 0 40px #f00;
    }
}

@keyframes hp-damage-flash {
    0% { color: #fff; transform: scale(1.2); }
    100% { color: #f00; transform: scale(1); }
}

@keyframes hp-heal-flash {
    0% { color: #0f0; transform: scale(1.2); text-shadow: 0 0 20px #0f0; }
    100% { color: #f00; transform: scale(1); text-shadow: 3px 3px 0 #000; }
}

#hp-display {
    transition: color 0.3s, transform 0.2s;
}

#hp-display.critical {
    animation: hp-critical-pulse 0.8s ease-in-out infinite;
}

#hp-display.damage {
    animation: hp-damage-flash 0.3s ease-out;
}

#hp-display.heal {
    animation: hp-heal-flash 0.5s ease-out;
}

#hp-display.medium-hp {
    color: #fa0 !important;
}

/* Weapon Slot Animations */
@keyframes slot-select {
    0% { transform: skew(-5deg) scale(1); }
    50% { transform: skew(-5deg) scale(1.2); }
    100% { transform: skew(-5deg) scale(1.1); }
}

@keyframes slot-deselect {
    0% { transform: skew(-5deg) scale(1.1); }
    100% { transform: skew(-5deg) scale(1); }
}

.weapon-slot {
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.weapon-slot.selecting {
    animation: slot-select 0.25s ease-out forwards;
}

.weapon-slot.deselecting {
    animation: slot-deselect 0.2s ease-out forwards;
}

/* Reload bar pulse */
@keyframes reload-pulse {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 0, 0, 0.6); }
}

#reload-bar-container {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 8px;
    background: #111;
    border: 2px solid #333;
    display: none;
    animation: reload-pulse 0.5s ease-in-out infinite;
}

#reload-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f00, #ff0);
    transition: width 0.1s linear;
}

/* Weapon name fade animation */
@keyframes weapon-name-switch {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

#weapon-name.switching {
    animation: weapon-name-switch 0.3s ease-out;
}

/* ============================================
   SKILLS TAB STYLES
   ============================================ */

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

.skills-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ff0a0a, transparent);
}

.skills-xp {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    padding: 10px 20px;
    border: 1px solid #ff0a0a;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    box-shadow: 0 0 20px rgba(255, 10, 10, 0.2);
}

.skills-xp .xp-icon {
    font-size: 22px;
    animation: xp-pulse 2s ease-in-out infinite;
}

.skills-xp .xp-amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #ff0a0a;
    text-shadow: 0 0 15px rgba(255, 10, 10, 0.5);
}

.skills-xp .xp-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: #666;
    letter-spacing: 2px;
}

@keyframes xp-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.skills-info {
    text-align: center;
    color: #666;
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    flex-shrink: 0;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 5px;
}

.skill-card {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid #2a2a2a;
    overflow: hidden;
    transition: all 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.skill-card.animate-in {
    animation: skill-slide-in 0.3s ease-out both;
}

.skill-card:hover {
    border-color: #ff0a0a;
    transform: translateX(5px);
    box-shadow: 0 0 20px rgba(255, 10, 10, 0.2);
}

.skill-card.maxed {
    border-color: #00ff00;
    background: linear-gradient(135deg, #0a1a0a 0%, #050d05 100%);
}

.skill-card.maxed:hover {
    border-color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

@keyframes skill-slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.skill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    min-height: 55px;
    font-size: 22px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid #333;
}

.skill-info {
    flex: 1;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.skill-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
}

.skill-desc {
    font-size: 9px;
    color: #888;
    line-height: 1.2;
}

.skill-effect {
    font-size: 10px;
    color: #0af;
    font-weight: bold;
}

.skill-progress-container {
    position: relative;
    height: 12px;
    background: #000;
    border: 1px solid #333;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 3px;
}

.skill-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #f00 0%, #fa0 100%);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.skill-card.maxed .skill-progress-bar {
    background: linear-gradient(90deg, #0a0 0%, #0f0 100%);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.skill-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: #fff;
    text-shadow: 0 0 3px #000, 0 0 5px #000;
    font-weight: bold;
    letter-spacing: 1px;
}

.skill-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 1px solid #333;
    min-width: 70px;
}

.skill-cost {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #fa0;
    margin-bottom: 5px;
}

.skill-cost .xp-icon {
    font-size: 12px;
}

.skill-btn {
    padding: 6px 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #555;
    background: #1a1a1a;
    border: 1px solid #333;
    cursor: not-allowed;
    transition: all 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 4px 100%, 0 calc(100% - 4px));
}

.skill-btn.affordable {
    color: #fff;
    background: linear-gradient(135deg, #ff0a0a 0%, #aa0000 100%);
    border-color: #ff0a0a;
    cursor: pointer;
    animation: btn-glow 2s ease-in-out infinite;
}

.skill-btn.affordable:hover {
    background: linear-gradient(135deg, #ff3333 0%, #ff0a0a 100%);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 10, 10, 0.5);
}

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

@keyframes btn-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 0, 0, 0.6); }
}

.skill-maxed {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #00ff00;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    animation: maxed-pulse 2s ease-in-out infinite;
}

@keyframes maxed-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Scrollbar styling for skills grid */
.skills-grid::-webkit-scrollbar {
    width: 6px;
}

.skills-grid::-webkit-scrollbar-track {
    background: #111;
    border-radius: 3px;
}

.skills-grid::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.skills-grid::-webkit-scrollbar-thumb:hover {
    background: #f00;
}
