@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Montserrat:wght@600;700;800;900&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
    /* Obsidian Tactical Dark Palette */
    --bg-base: #060911;
    --bg-surface-1: #0c111d;
    --bg-surface-2: #121929;
    --bg-surface-3: #182238;
    --bg-surface-hover: #1f2c47;
    
    /* Dragon Gold Brand Palette */
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-gradient: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
    --gold-glow: rgba(245, 158, 11, 0.25);
    
    /* Cyber & Accent Colors */
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --purple-500: #a855f7;
    
    /* Borders & Dividers */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-gold: rgba(245, 158, 11, 0.35);
    
    /* Typography */
    --font-main: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: "Montserrat", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Base Body Styles */
body {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(245, 158, 11, 0.07), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(6, 182, 212, 0.05), transparent),
        linear-gradient(180deg, #060911 0%, #090e1a 100%);
    background-attachment: fixed;
    color: #e2e8f0;
    font-family: var(--font-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

/* Subtle Top Accent Line */
.top-accent-stripe {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 50%, #06b6d4 100%);
}

/* Glass & Card Surfaces */
.surface-panel {
    background: var(--bg-surface-1);
    border: 1px solid var(--border-default);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.surface-card {
    background: var(--bg-surface-1);
    border: 1px solid var(--border-default);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.surface-card:hover {
    background: var(--bg-surface-2);
    border-color: var(--border-strong);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.surface-card-selected {
    border-color: var(--gold-500) !important;
    background: var(--bg-surface-2) !important;
    box-shadow: 0 0 0 1px var(--gold-500), 0 8px 24px var(--gold-glow) !important;
}

/* ==========================================================================
   Tactile Bespoke Buttons (Anti-AI-Slop Linear/Raycast Style)
   ========================================================================== */

/* Base Button Properties */
.btn-tactile {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.25rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.875rem;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    user-select: none;
}

.btn-tactile:active {
    transform: translateY(1px);
}

.btn-tactile:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 1. Primary Gold Button */
.btn-gold {
    background: var(--gold-gradient);
    color: #0b0f19;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-gold:hover:not(:disabled) {
    filter: brightness(1.06);
    box-shadow: 0 3px 12px var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-gold:active:not(:disabled) {
    filter: brightness(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 2. Secondary Surface Button */
.btn-surface {
    background: var(--bg-surface-2);
    color: #f1f5f9;
    border: 1px solid var(--border-default);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-surface:hover:not(:disabled) {
    background: var(--bg-surface-3);
    border-color: var(--border-strong);
    color: #ffffff;
}

.btn-surface:active:not(:disabled) {
    background: var(--bg-surface-1);
    border-color: var(--border-default);
}

/* 3. Emerald Success Button */
.btn-emerald {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-emerald:hover:not(:disabled) {
    filter: brightness(1.06);
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 4. Crimson Danger Button */
.btn-danger {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-danger:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.3);
}

/* 5. Cyber Cyan Button */
.btn-cyan {
    background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-cyan:hover:not(:disabled) {
    filter: brightness(1.06);
    box-shadow: 0 3px 12px rgba(14, 165, 233, 0.3);
}

/* 6. Ghost Button */
.btn-ghost {
    background: transparent;
    color: #94a3b8;
    border: 1px solid transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-surface-2);
    border-color: var(--border-subtle);
    color: #f1f5f9;
}

/* ==========================================================================
   Tactile Inputs & Form Controls
   ========================================================================== */

input[type="text"],
input[type="number"],
input[type="password"],
select {
    background-color: #090e1a !important;
    border: 1px solid var(--border-default) !important;
    color: #f8fafc !important;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    transition: all 0.15s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: var(--gold-500) !important;
    box-shadow: 0 0 0 1px var(--gold-500), 0 0 12px rgba(245, 158, 11, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    outline: none !important;
}

/* ==========================================================================
   Custom iOS/Linear Toggle Switch Component (Replaces Ugly Checkboxes)
   ========================================================================== */

.switch-wrapper {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.switch-slider {
    position: relative;
    width: 2.5rem;
    height: 1.375rem;
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.switch-slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    background-color: #94a3b8;
    border-radius: 9999px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.switch-input:checked + .switch-slider {
    background-color: #f59e0b;
    border-color: #d97706;
}

.switch-input:checked + .switch-slider::after {
    transform: translateX(1.125rem);
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Specific Accent Variants for Switches */
.switch-emerald .switch-input:checked + .switch-slider {
    background-color: #10b981;
    border-color: #059669;
}

.switch-cyan .switch-input:checked + .switch-slider {
    background-color: #0ea5e9;
    border-color: #0284c7;
}

.switch-purple .switch-input:checked + .switch-slider {
    background-color: #a855f7;
    border-color: #7e22ce;
}

.switch-rose .switch-input:checked + .switch-slider {
    background-color: #f43f5e;
    border-color: #be123c;
}

/* ==========================================================================
   Energy Bars & Meters
   ========================================================================== */

.bar-hp {
    background: linear-gradient(90deg, #ef4444 0%, #f43f5e 100%);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.35);
}

.bar-mp {
    background: linear-gradient(90deg, #0ea5e9 0%, #06b6d4 100%);
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.35);
}

/* ==========================================================================
   Module Navigation & Badges
   ========================================================================== */

.nav-module-card {
    background: var(--bg-surface-1);
    border: 1px solid var(--border-default);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.nav-module-card:hover {
    background: var(--bg-surface-2);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.nav-module-card:active {
    transform: translateY(0);
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1875rem 0.5rem;
    border-radius: 0.375rem;
    line-height: 1;
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.04);
}

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

::-webkit-scrollbar-track {
    background: #060911;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}
