/* ============================================
   SIERRA NEVADA LIVE - GLOBAL STYLES
   Sistema de diseño inspirado en iOS
   ============================================ */

:root {
    /* ===== iOS-inspired Color Palette ===== */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);

    /* ===== Typography - SF Pro Display-like ===== */
    --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Font Sizes - Optimizadas para legibilidad */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */

    /* ===== Text Colors - Alto contraste para visibilidad ===== */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-tertiary: rgba(255, 255, 255, 0.6);
    --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);

    /* ===== iOS Spacing ===== */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* ===== iOS Border Radius ===== */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* ===== Colors ===== */
    --color-cyan-300: #67e8f9;
    --color-cyan-400: #22d3ee;
    --color-cyan-500: #06b6d4;
    --color-green-400: #4ade80;
    --color-green-500: #22c55e;
    --color-yellow-500: #eab308;
    --color-red-500: #ef4444;

    /* ===== Transitions ===== */
    --transition-fast: 150ms cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-ios: 500ms cubic-bezier(0.19, 1, 0.22, 1);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-system);
    font-weight: var(--font-weight-regular);
    color: var(--text-primary);
    background-color: #0f172a;
    min-height: 100vh;
    overflow-x: hidden;

    /* Font smoothing para texto suave */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;

    /* Evitar tap highlight en móviles */
    -webkit-tap-highlight-color: transparent;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    text-shadow: var(--text-shadow);
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p,
span,
div {
    text-shadow: var(--text-shadow);
}

/* ===== Background dinámico ===== */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    will-change: transform;
    transition: opacity var(--transition-slow);
}

/* Fondos según clima */
body[data-weather="sunny"]::before {
    background-image: linear-gradient(to bottom, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.5)), url('../background.png');
}

body[data-weather="cloudy"]::before {
    background-image: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.6)), url('../background.png');
}

body[data-weather="rain"]::before {
    background-image: linear-gradient(to bottom, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.7)), url('../background.png');
}

body[data-weather="snow"]::before {
    background-image: linear-gradient(to bottom, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.5)), url('../background.png');
}

/* ===== Utility Classes ===== */
.no-scroll {
    overflow: hidden;
    height: 100vh;
}

.gpu-accel {
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* ===== Selection ===== */
::selection {
    background-color: var(--color-cyan-500);
    color: white;
}

::-moz-selection {
    background-color: var(--color-cyan-500);
    color: white;
}

/* ===== Scrollbar (webkit) ===== */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* ===== Safe Area para móviles ===== */
@supports (padding: env(safe-area-inset-bottom)) {
    .pb-safe {
        padding-bottom: env(safe-area-inset-bottom);
    }
}