/* Lanos Design System */
:root {
    /* Brand Colors - HSL for easy manipulation */
    --hue-primary: 250;
    /* Deep Indigo/Purple */
    --hue-secondary: 320;
    /* Vibrant Pink/Magenta */
    --hue-success: 150;
    --hue-danger: 340;

    --color-primary: hsl(var(--hue-primary), 80%, 60%);
    --color-primary-dark: hsl(var(--hue-primary), 80%, 45%);
    --color-secondary: hsl(var(--hue-secondary), 80%, 60%);

    /* Neutral / Surface Colors (Light Mode) */
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    --color-surface-glass: rgba(255, 255, 255, 0.7);
    --color-text: #2d3436;
    --color-text-muted: #636e72;
    --color-border: #dfe6e9;

    /* Shadows & Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --glass-blur: blur(12px);

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --transition-fast: 0.2s ease;
    --invert-icon: 0;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Neutral / Surface Colors (Dark Mode) */
        --color-bg: #0f1115;
        --color-surface: #181b21;
        --color-surface-glass: rgba(24, 27, 33, 0.7);
        --color-text: #dfe6e9;
        --color-text-muted: #b2bec3;
        --color-border: #2d3436;

        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

        --invert-icon: 1;
    }
}

:root[data-theme="light"] {
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    --color-surface-glass: rgba(255, 255, 255, 0.7);
    --color-text: #2d3436;
    --color-text-muted: #636e72;
    --color-border: #dfe6e9;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    --invert-icon: 0;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --color-bg: #0f1115;
    --color-surface: #181b21;
    --color-surface-glass: rgba(24, 27, 33, 0.7);
    --color-text: #dfe6e9;
    --color-text-muted: #b2bec3;
    --color-border: #2d3436;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

    --invert-icon: 1;
    color-scheme: dark;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

/* Glassmorphism Utility */
.glass-panel {
    background: var(--color-surface-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    /* Safari */
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* Card Styling */
.lanos-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.lanos-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

/* Buttons */
.btn-premium {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.btn-premium:hover {
    opacity: 0.9;
    transform: scale(1.02);
    color: white;
}

.btn-premium:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Editable Headers */
.editable-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 1.5rem;
    /* Space for icon */
    transition: color 0.2s;
}

.editable-header:hover {
    color: var(--color-primary);
}

.editable-header .edit-icon {
    opacity: 0;
    font-size: 0.9em;
    margin-left: 0.5rem;
    transition: opacity 0.2s, transform 0.2s;
    color: var(--color-primary);
}

.editable-header:hover .edit-icon {
    opacity: 1;
    transform: translateX(2px);
}

.editable-input {
    font-size: 1.5rem;
    /* Explicitly match standard h4 size */
    font-weight: 500;
    font-family: inherit;
    color: inherit;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--color-primary);
    padding: 0;
    margin: 0;
    width: 100%;
    outline: none;
    box-shadow: none;
    line-height: 1.2;
    /* Tighter line height for input */
}

.editable-input:focus {
    background: transparent;
    box-shadow: none;
    border-bottom: 2px solid var(--color-primary-dark);
}

.editable-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.btn-icon-small {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    line-height: 1;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-text-muted);
    transition: all 0.2s;
}

.btn-icon-small:hover {
    color: var(--color-primary);
    background: rgba(0, 0, 0, 0.05);
}

.btn-icon-small.save {
    color: var(--color-success, #00b894);
    /* Fallback or define var */
}

.btn-icon-small.save:hover {
    background: rgba(0, 184, 148, 0.1);
}

/* Floating Action Button (FAB) */
.fab-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1000;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.fab-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    color: white;
}

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

/* Mobile Adjustments for FAB */
@media (max-width: 576px) {
    .fab-btn {
        bottom: 6rem;
        /* Raised to clear the bottom navigation */
        right: 1.5rem;
    }
}
