/* ============================================
   BLORPS App - Base Styles
   Variables, Reset, Typography
   ============================================ */

/* CSS Variables — River / Underwater palette (synced with landing page styles.css) */
:root {
    /* Background — deep river bed → upper water */
    --bg-dark: #051828;
    --bg-gradient-1: #0a2640;
    --bg-gradient-2: #144258;
    --bg-gradient-3: #051828;
    --bg-card: rgba(14, 38, 56, 0.85);
    --bg-card-hover: rgba(24, 64, 88, 0.95);
    --bg-sidebar: rgba(8, 26, 42, 0.98);

    /* Primary brand: river aqua-cyan (was neon green) */
    --green-glow: #b3f2fa;
    --green-light: #7feaf5;
    --green-main: #2dd4e9;
    --green-dark: #0e9bb1;

    /* Salmon coral accent (was hot pink) */
    --pink-glow: #ffd6c4;
    --pink-light: #ffc4ad;
    --pink-main: #ff8a6c;
    --pink-dark: #e25f3e;

    /* Clear water blue */
    --blue-glow: #d6ecf8;
    --blue-light: #b3d9f2;
    --blue-main: #5fa8d6;
    --blue-dark: #2c6f9a;

    /* Roe / caviar warm orange (was yellow) */
    --yellow-glow: #ffe6c8;
    --yellow-light: #ffd6a8;
    --yellow-main: #ffa157;
    --yellow-dark: #e57224;

    /* Deep water shadow (was alien purple) */
    --purple-glow: #d6e4ee;
    --purple-light: #c0d4e0;
    --purple-main: #4e6d80;
    --purple-dark: #0c1d2e;

    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.75);
    --text-dim: rgba(255, 255, 255, 0.5);

    --border-subtle: rgba(45, 212, 233, 0.14);
    --border-active: rgba(45, 212, 233, 0.5);
    --border-glow: rgba(45, 212, 233, 0.8);

    /* Typography */
    --font-display: 'Lilita One', cursive;
    --font-body: 'Nunito', sans-serif;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 72px;

    /* Transitions */
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);

    /* Shadows & Glows */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.5);
    --glow-green: 0 0 20px rgba(45, 212, 233, 0.4);
    --glow-pink: 0 0 20px rgba(255, 138, 108, 0.4);
    --glow-blue: 0 0 20px rgba(95, 168, 214, 0.4);
    --glow-yellow: 0 0 20px rgba(255, 161, 87, 0.4);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Utility Classes */
.text-muted {
    color: var(--text-muted);
}

.text-dim {
    color: var(--text-dim);
}

.text-green {
    color: var(--green-main);
}

.text-pink {
    color: var(--pink-main);
}

.text-blue {
    color: var(--blue-main);
}

.text-yellow {
    color: var(--yellow-main);
}

/* ============================================
   Premium UI Enhancements
   ============================================ */

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--green-main), var(--green-dark));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green-light);
}

/* Loading skeleton animation */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Pulse effect for live elements */
.pulse {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
}

/* Tooltip styles */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-subtle);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Enhanced focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

/* Mini blorp bounce on team */
.mini-blorp:hover {
    transform: translateY(-4px) scale(1.1);
    z-index: 10;
}

/* Glassmorphism effect helper */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced section headers */
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--green-main), transparent);
    border-radius: 2px;
}

/* Card shimmer effect on hover */
.stat-card::after,
.expedition-card::after,
.blorp-mini-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

.stat-card:hover::after,
.expedition-card:hover::after,
.blorp-mini-card:hover::after {
    left: 100%;
}

/* Button press effect */
button:active:not(:disabled) {
    transform: scale(0.98) !important;
}

/* Rarity shimmer effects */
.blorp-mini-card.legendary::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 217, 61, 0.1),
        transparent
    );
}

.blorp-mini-card.epic::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 107, 205, 0.1),
        transparent
    );
}

/* Success/Error state colors */
.success { color: var(--green-main); }
.error { color: #f87171; }
.warning { color: var(--yellow-main); }

/* Hover highlight for interactive rows */
.inheritance-row,
.cost-row {
    transition: background 0.2s ease;
    border-radius: 8px;
    padding: 10px 12px;
    margin: -10px -12px;
}

.inheritance-row:hover,
.cost-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Text selection */
::selection {
    background: var(--green-main);
    color: var(--purple-dark);
}

/* Native select styling */
select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 12px;
    padding-right: 36px;
    color: var(--text-main);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

select:hover {
    border-color: var(--border-active);
    background-color: rgba(74, 222, 128, 0.05);
}
