/* goxlar.app — theme, GoXLR UI, forms, modal, dashboard (after style.css) */

html[data-theme="light"] {
    --color-black: #f4f4f5;
    --color-dark: #e4e4e7;
    --color-surface: #ffffff;
    --color-surface-light: #fafafa;
    --color-surface-hover: #e4e4e7;
    --color-text: #18181b;
    --color-text-muted: #71717a;
    --color-text-dim: #a1a1aa;
    --color-white: #09090b;
    --color-gold: #00b8b8;
    --color-gold-light: #00e5e5;
    --color-gold-dark: #006666;
}
html[data-theme="light"] .navbar.php-nav {
    background: rgba(244, 244, 245, 0.95);
    border-bottom: 1px solid rgba(0, 180, 180, 0.2);
    box-shadow: 0 1px 0 rgba(200, 0, 200, 0.06);
}
html[data-theme="light"] .site-footer.php-footer {
    background: #e4e4e7;
    color: var(--color-text);
}

/* Only lock scroll while loader shows — class "page-loading" stays on body, so use :not(.is-ready) */
body.page-loading:not(.is-ready) {
    overflow: hidden;
}
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-black);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
body.is-ready .page-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.page-loader-inner { text-align: center; }
/* Cyan + magenta only (no rainbow / full-spectrum animation) */
.loader-rainbow {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-md);
    border-radius: 50%;
    border: 3px solid rgba(0, 255, 255, 0.25);
    border-top-color: #00ffff;
    border-right-color: #ff00ff;
    border-bottom-color: #00ffff;
    border-left-color: #ff00ff;
    animation: gxd-spin 0.9s linear infinite;
}
@keyframes gxd-spin { to { transform: rotate(360deg); } }
.loader-text {
    font-weight: 800;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    color: #00ffff;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.55), 0 0 28px rgba(255, 0, 255, 0.25);
    animation: gxd-text-pulse 3s ease-in-out infinite;
}
@keyframes gxd-text-pulse {
    0%, 100% { color: #00ffff; text-shadow: 0 0 12px rgba(0, 255, 255, 0.55), 0 0 20px rgba(255, 0, 255, 0.2); }
    50% { color: #ff66ff; text-shadow: 0 0 14px rgba(255, 0, 255, 0.5), 0 0 24px rgba(0, 255, 255, 0.25); }
}

.logo-rgb, .logo-rgb-hero {
    background: linear-gradient(90deg, #00ffff 0%, #00e0e0 35%, #ff00ff 50%, #e000e0 65%, #00ffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.35)) drop-shadow(0 0 14px rgba(255, 0, 255, 0.2));
}

.rgb-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(0, 255, 255, 0.92);
    background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
        linear-gradient(120deg, #00ffff, #ff00ff) border-box;
    border: 1px solid transparent;
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.12), 0 0 24px rgba(255, 0, 255, 0.06);
}
.rgb-shift {
    animation: gxd-hero-glow 6s ease-in-out infinite;
    opacity: 0.4;
}
@keyframes gxd-hero-glow {
    0%, 100% { opacity: 0.32; filter: blur(60px); }
    50% { opacity: 0.48; filter: blur(56px); }
}

.php-nav .nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}
.nav-user {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.btn-nav {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
}
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}
.theme-toggle:hover { transform: scale(1.05); }
html[data-theme="dark"] .theme-icon.sun { opacity: 0.35; }
html[data-theme="dark"] .theme-icon.moon { opacity: 1; }
html[data-theme="light"] .theme-icon.sun { opacity: 1; }
html[data-theme="light"] .theme-icon.moon { opacity: 0.35; }

.toast {
    position: fixed;
    top: 100px;
    right: var(--space-xl);
    z-index: 100000;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    animation: toast-in 0.4s ease;
    max-width: min(400px, 90vw);
    box-shadow: var(--shadow-lg);
}
.toast-success {
    background: linear-gradient(135deg, rgba(0, 200, 200, 0.92), rgba(180, 0, 180, 0.88));
    color: #fff;
    box-shadow: 0 0 24px rgba(0, 255, 255, 0.15);
}
.toast-error {
    background: linear-gradient(135deg, #E62125, #ff6b6b);
    color: #fff;
}
@keyframes toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero-visual--goxlr-device {
    width: 100%;
    max-width: min(1020px, 100%);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
}

.goxlr-rgb-wrap {
    padding: 4px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #00ffff 0%, #009999 40%, #ff00ff 100%);
    box-shadow: 0 0 24px rgba(0, 255, 255, 0.12), 0 0 40px rgba(255, 0, 255, 0.08);
}
.rgb-border-anim {
    border-radius: calc(var(--radius-xl) - 4px);
    overflow: hidden;
}
.goxlr-mixer .mixer-channels {
    gap: 0.35rem;
    padding: var(--space-md);
}
.goxlr-channel {
    min-width: 52px;
    flex: 1;
    max-width: 72px;
    padding: var(--space-sm) 4px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, hsla(var(--strip-hue, 200), 70%, 12%, 0.5), var(--color-surface));
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    animation: strip-in 0.6s ease backwards;
    animation-delay: var(--delay, 0ms);
}
@keyframes strip-in {
    from { opacity: 0; transform: translateY(16px); }
}
.goxlr-channel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px hsla(var(--strip-hue, 200), 80%, 50%, 0.25);
}
.goxlr-channel.is-muted-strip { opacity: 0.7; filter: grayscale(0.35); }
.master-strip {
    min-width: 64px;
    max-width: 80px;
    border-width: 2px;
    border-color: hsla(40, 80%, 50%, 0.4);
}
.mute-btn {
    width: 28px;
    height: 22px;
    margin: 0 auto var(--space-xs);
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: var(--color-surface-light);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.mute-btn.is-muted {
    background: #E62125;
    color: #fff;
    border-color: #ff4444;
    box-shadow: 0 0 12px rgba(230, 33, 37, 0.5);
}
.fader-vertical {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: var(--space-sm) 0;
}
.fader-input {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 6px;
    transform: rotate(-90deg);
    transform-origin: center center;
    background: transparent;
    cursor: pointer;
    z-index: 2;
}
.fader-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 32px;
    border-radius: 4px;
    background: linear-gradient(180deg, #3a3a42, #1a1a1e);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.fader-input::-moz-range-thumb {
    width: 22px;
    height: 32px;
    border-radius: 4px;
    background: linear-gradient(180deg, #3a3a42, #1a1a1e);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.fader-track {
    position: absolute;
    width: 6px;
    height: 110px;
    border-radius: 3px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.4));
    pointer-events: none;
}
.meter-bright .meter-bar {
    background: linear-gradient(180deg, var(--color-meter-red), var(--color-meter-yellow), var(--color-meter-green)) !important;
}

.auth-section { padding: var(--space-4xl) 0; min-height: 60vh; }
.auth-container { max-width: 440px; margin: 0 auto; }
.auth-card {
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.card-rgb {
    position: relative;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 20px 50px rgba(0, 0, 0, 0.4);
}
.card-rgb::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(130deg, #00ffff, #00a8a8, #ff00ff, #aa00aa);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.45;
}
.auth-title { font-size: 1.75rem; margin-bottom: var(--space-lg); }
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}
.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--color-dark);
    color: var(--color-text);
    font-family: inherit;
}
html[data-theme="light"] .form-input,
html[data-theme="light"] .form-textarea {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.12);
}
.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: rgba(0, 255, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.12), 0 0 18px rgba(255, 0, 255, 0.08);
}
.form-error {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border-radius: var(--radius-md);
    background: rgba(230, 33, 37, 0.15);
    border: 1px solid rgba(230, 33, 37, 0.4);
    color: #ff8888;
    font-size: 0.9rem;
}
.btn-block { width: 100%; justify-content: center; }
.auth-switch {
    margin-top: var(--space-lg);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.auth-switch a { color: var(--color-gold-light); font-weight: 600; }

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 90000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal {
    position: relative;
    max-width: 420px;
    width: 100%;
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-base);
}
.modal-overlay.is-open .modal { transform: scale(1) translateY(0); }
.modal-title { font-size: 1.35rem; margin-bottom: var(--space-md); }
.modal-text { color: var(--color-text-muted); margin-bottom: var(--space-xl); line-height: 1.6; }
.modal-actions { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.modal-actions .btn { flex: 1; min-width: 140px; justify-content: center; }
.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--color-white); background: rgba(255, 255, 255, 0.06); }

.dashboard-section { padding: var(--space-4xl) 0; }
.dashboard-header { margin-bottom: var(--space-2xl); }
.dashboard-grid {
    display: grid;
    gap: var(--space-xl);
    grid-template-columns: 1fr;
}
@media (min-width: 900px) {
    .dashboard-grid { grid-template-columns: 280px 1fr; }
}
.dashboard-card {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}
.dashboard-card-title { font-size: 1rem; margin-bottom: var(--space-md); letter-spacing: 0.06em; }
.dashboard-actions { display: flex; flex-direction: column; gap: var(--space-sm); }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th, .data-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.data-table th {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}
.table-wrap { overflow-x: auto; }
.text-muted { color: var(--color-text-muted); }

.addons-hero { padding: var(--space-4xl) 0 var(--space-xl); }

.addons-db-notice {
    background: rgba(255, 200, 0, 0.08);
    border: 1px solid rgba(255, 200, 0, 0.35);
    color: var(--color-text);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
    font-size: 0.95rem;
    line-height: 1.55;
}
.addons-db-notice code {
    font-size: 0.85em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.25);
}
.addons-grid {
    display: grid;
    gap: var(--space-xl);
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .addons-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .addons-grid { grid-template-columns: repeat(3, 1fr); } }
.addon-card {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    min-height: 220px;
}
.addon-title { font-size: 1.1rem; margin-bottom: var(--space-md); }
.addon-desc { flex: 1; color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.55; }
.addon-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }

.profile-section-title {
    font-size: 1rem;
    margin: var(--space-xl) 0 var(--space-sm);
    color: var(--color-white);
}
html[data-theme="light"] .profile-section-title {
    color: var(--color-text);
}
.profile-hint {
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.form-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-gold);
}

.auth-verify-hint {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.otp-input {
    letter-spacing: 0.4em;
    font-size: 1.35rem;
    text-align: center;
    font-weight: 700;
}

.auth-inline-form {
    margin-top: var(--space-md);
}

.static-page { padding: var(--space-4xl) 0; }
.container.narrow { max-width: 720px; }
.prose { color: var(--color-text-muted); line-height: 1.75; }
.prose p { margin-bottom: var(--space-lg); }
.prose h2 {
    font-size: 1.1rem;
    color: var(--color-white);
    margin: var(--space-xl) 0 var(--space-md);
}
html[data-theme="light"] .prose h2 { color: var(--color-text); }

.site-footer.php-footer {
    margin-top: var(--space-4xl);
    padding: var(--space-3xl) 0 0;
    background: var(--color-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-grid {
    display: grid;
    gap: var(--space-2xl);
    grid-template-columns: 1fr;
    padding-bottom: var(--space-2xl);
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-logo { font-size: 1.5rem; font-weight: 900; }
.site-footer .footer-links h4 {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
    color: var(--color-text-muted);
}
.site-footer .footer-links ul li { margin-bottom: var(--space-sm); }
.site-footer .footer-links a:hover { color: var(--color-gold-light); }
.site-footer .footer-bottom {
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-dim);
}

.card-hover-rgb { transition: transform var(--transition-base), box-shadow var(--transition-base); }
.card-hover-rgb:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 255, 255, 0.15), 0 8px 32px rgba(255, 0, 255, 0.08);
}

.support-item {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.support-item h3 { font-size: 1rem; margin-bottom: var(--space-sm); text-transform: none; letter-spacing: 0; }
