/* Liquid glass — adaptado de danielbarreiros para overlay oscuro sobre simulación */

:root {
    --glass-bg: rgba(255, 255, 255, 0.07);
    --glass-bg-hover: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-highlight: rgba(255, 255, 255, 0.32);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    --glass-text: rgba(221, 222, 225, 0.912);
    --glass-muted: rgba(221, 222, 225, 0.55);
    --glass-accent-from: rgb(255, 149, 0);
    --glass-saturation: 150%;
    --glass-reflex-dark: 2;
    --glass-reflex-light: 0.28;
}

.rounded-3xl { border-radius: 1.5rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-xl { border-radius: 0.75rem; }

/* --- Paneles en capas --- */
.liquidGlass-wrapper {
    position: relative;
    display: flex;
    overflow: hidden;
    box-shadow:
        0 6px 28px var(--glass-shadow),
        0 0 36px rgba(0, 0, 0, 0.25);
    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease,
        box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    isolation: isolate;
}

.liquidGlass-wrapper--hover:hover {
    box-shadow:
        0 10px 36px rgba(0, 0, 0, 0.45),
        0 0 48px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.liquidGlass-effect {
    position: absolute;
    z-index: 0;
    inset: 0;
    backdrop-filter: blur(24px) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(24px) saturate(var(--glass-saturation));
    overflow: hidden;
    border-radius: inherit;
    transform: translateZ(0);
}

@supports not (backdrop-filter: blur(1px)) {
    .liquidGlass-tint {
        background: rgba(8, 10, 18, 0.88) !important;
    }
}

.liquidGlass-tint {
    z-index: 1;
    position: absolute;
    inset: 0;
    background: var(--glass-bg);
    border-radius: inherit;
}

.liquidGlass-shine {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    border-radius: inherit;
    box-shadow:
        inset 2px 2px 1px 0 rgba(255, 255, 255, 0.14),
        inset -1px -1px 1px 1px rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.liquidGlass-text {
    z-index: 3;
    position: relative;
    width: 100%;
    color: var(--glass-text);
}

/* --- Título principal --- */
.app-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--glass-text);
}

.app-title__accent {
    font-weight: 800;
    background-image: linear-gradient(
        105deg,
        rgb(255, 149, 0) 0%,
        rgb(255, 200, 100) 55%,
        rgb(255, 220, 160) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.app-subtitle {
    margin: 0;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--glass-muted);
}

/* --- Botones liquid glass --- */
.liquid-glass {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    font-family: inherit;
    backdrop-filter: blur(30px) saturate(220%);
    -webkit-backdrop-filter: blur(30px) saturate(220%);
    transform: translateZ(0);
    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.liquid-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.liquid-glass::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow:
        inset 0 4px 14px rgba(255, 255, 255, 0.07),
        inset 0 -4px 14px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.liquid-glass:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
}

.liquid-glass:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
}

.liquid-glass:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.glass-white {
    background-color: rgba(255, 255, 255, 0.09);
    color: var(--glass-text);
    box-shadow: 0 12px 32px var(--glass-shadow);
}

.glass-white::before {
    background: linear-gradient(
        135deg,
        var(--glass-highlight) 0%,
        rgba(255, 255, 255, 0.05) 35%,
        rgba(255, 255, 255, 0) 65%,
        var(--glass-border) 100%
    );
}

.glass-white:hover:not(:disabled) {
    background-color: var(--glass-bg-hover);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.35),
        0 12px 32px var(--glass-shadow);
}

.glass-accent {
    background-color: rgba(255, 149, 0, 0.18);
    color: var(--glass-text);
    box-shadow: 0 12px 32px rgba(255, 149, 0, 0.2);
}

.glass-accent::before {
    background: linear-gradient(
        135deg,
        rgba(255, 200, 120, 0.45) 0%,
        rgba(255, 149, 0, 0.1) 35%,
        rgba(255, 149, 0, 0) 65%,
        rgba(255, 149, 0, 0.5) 100%
    );
}

.btn-pill {
    border-radius: 9999px;
    padding: 0.55rem 1.1rem;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.btn-pill-sm {
    border-radius: 9999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.6875rem;
    font-weight: 600;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    padding: 0;
    font-size: 14px;
}

/* --- Inputs y selects --- */
.glass-select,
select.glass-select {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    padding: 0.5rem 0.75rem;
    color: var(--glass-text);
    font-family: inherit;
    font-size: 0.75rem;
    outline: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.glass-select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: color-mix(in srgb, var(--glass-accent-from) 60%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--glass-accent-from) 22%, transparent);
}

.glass-select option {
    background: #0a0a0c;
    color: var(--glass-text);
}

.glass-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    color: var(--glass-text);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.glass-check-row:hover {
    background: rgba(255, 255, 255, 0.07);
}

.glass-check-row input[type="checkbox"] {
    flex-shrink: 0;
}

/* --- Grupos de opciones --- */
.option-group {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.12);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.option-group + .option-group {
    margin-top: 0.25rem;
}

.option-group__title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--glass-muted);
    padding-bottom: 0.35rem;
    margin-bottom: 0.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.field-hint {
    font-size: 9px;
    line-height: 1.45;
    color: var(--glass-muted);
    margin-top: 0.25rem;
}

/* --- HUD inferior --- */
.hud-glass {
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(22px) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(22px) saturate(var(--glass-saturation));
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, calc(0.12 * var(--glass-reflex-light))),
        0 8px 28px rgba(0, 0, 0, 0.35);
    color: var(--glass-text);
}

/* --- Toast --- */
.event-toast.glass-toast {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
