/* Merged styles for simple-styles theme compatibility */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --bg-color: #000000;
    --text-main: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: rgba(0, 0, 0, 0.1);
    --panel-bg: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);

    /* Font Sizes */
    --fs-title: 1.1rem;
    --fs-subtitle: 0.75rem;
    --fs-section-title: 0.75rem;
    --fs-label: 0.85rem;
    --fs-value: 0.85rem;
    --fs-stat-label: 0.7rem;
    --fs-stat-value: 1.05rem;
    --fs-btn: 0.875rem;
    --fs-legend: 0.75rem;
    --fs-chart-header: 0.75rem;
    --fs-sim-controls: 1.75rem;
    --sim-controls-max-width: 1920px;
    --sim-controls-width: auto;
    --sim-control-group-width: 350px;
    --sim-control-label-width: 350px;
    --sim-control-label-color: #000000;
    --sim-control-input-edit-width: 100px;
    --hud-time-tooltip-fs: 1.25rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: #ffffff;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Layout principal */
.app-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    background-color: var(--bg-color);
}

/* Lienzo de la simulación */
#sim-canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Premium Top HUD Container (Telemetry & Notifications) */
.top-hud-container {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 100;
    pointer-events: none;
    width: max-content;
}

/* Premium overlay for displaying calculations */
.value-display-card {
    background: var(--panel-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(209, 213, 219, 0.4);
    border-radius: 24px;
    padding: 20px 40px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
    text-align: center;
    transition: all 0.3s ease;
    min-width: 380px;
    color: #111827;
    pointer-events: auto;
}

.value-display-card:hover {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.g-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.g-value-main {
    font-family: var(--font-family);
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
    margin-bottom: 6px;
}

.hud-time-display {
    position: relative;
    cursor: help;
    display: inline-block;
}

.hud-time-tooltip {
    visibility: hidden;
    background-color: #111827;
    color: #ffffff;
    text-align: center;
    border-radius: 6px;
    padding: 6px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    font-size: var(--hud-time-tooltip-fs);
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    font-weight: 500;
}

.hud-time-display:hover .hud-time-tooltip {
    visibility: visible;
    opacity: 1;
}

.g-value-factor {
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    color: #9f1239;
    /* Burgundy Accent */
}

/* Floating control dock at the bottom */
.controls-container {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 100;
    pointer-events: none;
}

.simulation-controls {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(209, 213, 219, 0.4);
    border-radius: 100px;
    padding: 16px 40px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
    user-select: none;
    transition: all 0.3s ease;
    pointer-events: auto;
    color: #111827;
    font-size: var(--fs-sim-controls);
    max-width: var(--sim-controls-max-width);
    width: var(--sim-controls-width);
}

.simulation-controls:hover {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.12);
    border-color: rgba(209, 213, 219, 0.6);
}

.sim-control-group {
    display: flex;
    flex-direction: column;
    width: var(--sim-control-group-width);
}

.sim-control-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.94em;
    font-weight: 700;
    color: var(--sim-control-label-color);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#label-rm,
#label-rl {
    width: var(--sim-control-label-width);
    color: var(--sim-control-label-color);
    text-transform: none;
}

#exp-rm,
#exp-rl {
    cursor: pointer;
}

.sim-control-edit-input {
    width: var(--sim-control-input-edit-width);
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-align: center;
    padding: 1px 3px;
    margin: 0 2px;
}

.sim-control-value {
    font-family: monospace;
    font-size: 1em;
    font-weight: 700;
    color: #111827;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Minimal inputs */
.sim-control-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(209, 213, 219, 0.5);
    border-radius: 3px;
    outline: none;
    margin: 8px 0;
}

.sim-control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #111827;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.sim-control-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: #4b5563;
}

.sim-control-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #111827;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.sim-control-group input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.3);
    background: #4b5563;
}

/* Play/Pause Circle Button */
.reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 48px;
    border-radius: 50%;
    border: 1px solid rgba(209, 213, 219, 0.6);
    background: #111827;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.25em;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: var(--shadow-md);
}

.reset-btn:hover {
    background: #374151;
    transform: scale(1.08);
}

/* Presets */
.preset-group {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.preset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid rgba(209, 213, 219, 0.6);
    background: var(--panel-bg);
    color: #374151;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.preset-btn:hover {
    background: #ffffff;
    border-color: #9ca3af;
}

.preset-btn.active {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

/* Charts Panel (Bottom Left) */
.charts-panel {
    position: absolute;
    bottom: 36px;
    left: 24px;
    width: 320px;
    height: 180px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(209, 213, 219, 0.4);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-md);
    z-index: 100;
    display: flex;
    flex-direction: column;
    color: #111827;
}

.charts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-chart-header);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

#chart-canvas {
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 4px;
    color: #000000;
}

/* Faint Notification Overlay (Positioned within .top-hud-container) */
#notification {
    background: var(--panel-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(209, 213, 219, 0.4);
    padding: 10px 24px;
    color: #111827;
    border-radius: 8px;
    font-size: 0.85rem;
    pointer-events: none;
    text-align: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    transform: translateY(-10px);
    /* Subtle slide down animation relative to flex position */
    box-shadow: var(--shadow-lg);
    max-width: 80vw;
    font-weight: 500;
}

#notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline progress slider (Full Width, Bottom) */
#timelineContainer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    z-index: 100;
}

#timelineRange {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    /* default background */
    outline: none;
    margin: 0;
    cursor: pointer;
}

#timelineRange::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 12px;
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s ease, background-color 0.1s ease;
}

#timelineRange::-webkit-slider-thumb:hover {
    transform: scaleY(1.4);
    background: #3498db;
}

#timelineRange::-moz-range-thumb {
    width: 24px;
    height: 12px;
    background: #ffffff;
    border-radius: 0;
    border: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive styling overrides */
@media (max-width: 768px) {
    .controls-container {
        width: 100%;
        position: relative;
        bottom: 0;
        left: 0;
        transform: none;
        padding: 16px;
        background: #ffffff;
        color: #111827;
    }

    .simulation-controls {
        width: 100%;
        border-radius: 12px;
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .sim-control-group {
        width: 100%;
    }

    .value-display-card {
        width: 90%;
        min-width: 0;
    }
}