/**
 * RBOS Interactive Astrology Question-Flow Styles
 * Cinematic cosmic aesthetic with spring physics, glowing celestial ellipse,
 * responsive slide-in sidebar on desktop, and full-screen modal on mobile.
 */

:root {
    --aq-bg: #0b0f19;
    --aq-surface: #111827;
    --aq-surface-card: rgba(17, 24, 39, 0.94);
    --aq-accent-blue: #38bdf8;
    --aq-accent-purple: #818cf8;
    --aq-accent-gold: #f59e0b;
    --aq-accent-emerald: #10b981;
    --aq-text: #f9fafb;
    --aq-text-muted: #9ca3af;
    --aq-border: rgba(255, 255, 255, 0.1);
    --aq-glow: 0 0 40px rgba(56, 189, 248, 0.25);
    --aq-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating Action Button (FAB) */
.rbos-aq-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    background: linear-gradient(135deg, #0284c7, #38bdf8, #818cf8);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.6rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.4);
    transition: all 0.3s var(--aq-ease);
}

.rbos-aq-fab:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 40px rgba(56, 189, 248, 0.5);
}

.rbos-aq-fab-icon {
    font-size: 1.2rem;
    animation: rbos-aq-pulse 3s infinite;
}

@keyframes rbos-aq-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.18); opacity: 1; filter: drop-shadow(0 0 8px #38bdf8); }
}

/* Overlay & Backdrop */
.rbos-aq-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 14, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--aq-ease);
}

.rbos-aq-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Slide-in Sidebar (Desktop) / Fullscreen Modal (Mobile) */
.rbos-aq-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 520px;
    max-width: 100vw;
    height: 100vh;
    background: var(--aq-bg);
    border-right: 1px solid var(--aq-border);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.7);
    z-index: 100001;
    transform: translateX(-100%);
    transition: transform 0.5s var(--aq-ease);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rbos-aq-sidebar.active {
    transform: translateX(0);
}

@media (max-width: 640px) {
    .rbos-aq-sidebar {
        width: 100vw;
        border-right: none;
    }
}

/* Cosmic Particle Canvas in Background */
.rbos-aq-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
    z-index: 1;
}

/* Large Cinematic Celestial Ellipse */
.rbos-aq-ellipse-container {
    position: absolute;
    top: -80px;
    right: -100px;
    width: 380px;
    height: 380px;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.2s ease-out;
}

.rbos-aq-ellipse {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.05) 60%, transparent 80%);
    border: 1.5px solid transparent;
    border-image: linear-gradient(135deg, rgba(56, 189, 248, 0.5), rgba(245, 158, 11, 0.3), rgba(129, 140, 248, 0.2)) 1;
    box-shadow: inset 0 0 50px rgba(56, 189, 248, 0.1), 0 0 60px rgba(129, 140, 248, 0.15);
    animation: rbos-aq-spin 75s linear infinite;
}

@keyframes rbos-aq-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Sidebar Header */
.rbos-aq-header {
    position: relative;
    z-index: 10;
    padding: 1.5rem 1.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rbos-aq-header-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rbos-aq-header-title span {
    color: var(--aq-accent-blue);
}

.rbos-aq-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rbos-aq-btn-icon {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--aq-border);
    color: var(--aq-text);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.rbos-aq-btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--aq-accent-blue);
}

/* Progress Tracker */
.rbos-aq-progress-bar {
    position: relative;
    z-index: 10;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    width: 100%;
}

.rbos-aq-progress-fill {
    height: 100%;
    width: 9%;
    background: linear-gradient(90deg, var(--aq-accent-blue), var(--aq-accent-purple), var(--aq-accent-gold));
    transition: width 0.4s var(--aq-ease);
}

/* Privacy Guarantee Trust Banner */
.rbos-aq-trust {
    position: relative;
    z-index: 10;
    margin: 1rem 1.8rem 0;
    padding: 0.65rem 0.95rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.rbos-aq-trust-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.rbos-aq-trust-text {
    font-size: 0.76rem;
    color: #a7f3d0;
    line-height: 1.35;
}

/* Question Content Viewport */
.rbos-aq-body {
    position: relative;
    z-index: 10;
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
}

/* Text Hierarchy */
.rbos-aq-category {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--aq-accent-gold);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.rbos-aq-question {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.rbos-aq-hint {
    font-size: 0.88rem;
    color: var(--aq-text-muted);
    line-height: 1.45;
    margin-bottom: 1.75rem;
}

/* Answer Controls & Cards */
.rbos-aq-control-area {
    margin-bottom: 1.5rem;
    flex: 1;
}

.rbos-aq-input {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--aq-border);
    border-radius: 14px;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.rbos-aq-input:focus {
    outline: none;
    border-color: var(--aq-accent-blue);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

/* Cinematic Radio Cards */
.rbos-aq-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.rbos-aq-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--aq-border);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s var(--aq-ease);
    user-select: none;
}

.rbos-aq-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.rbos-aq-card.selected {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.1));
    border-color: var(--aq-accent-blue);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.rbos-aq-card-icon {
    font-size: 1.4rem;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rbos-aq-card.selected .rbos-aq-card-icon {
    background: rgba(56, 189, 248, 0.2);
    color: var(--aq-accent-blue);
}

.rbos-aq-card-text {
    font-size: 1.02rem;
    font-weight: 600;
    color: #ffffff;
}

/* Slider Controls */
.rbos-aq-slider-container {
    padding: 1rem 0;
}

.rbos-aq-slider-value {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--aq-accent-blue);
    margin-bottom: 1rem;
    font-feature-settings: "tnum";
}

.rbos-aq-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.rbos-aq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--aq-accent-blue);
    cursor: pointer;
    box-shadow: 0 0 15px var(--aq-accent-blue);
    transition: transform 0.15s ease;
}

.rbos-aq-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Action Bar with Skip on Left, Continue on Right */
.rbos-aq-action-bar {
    position: relative;
    z-index: 10;
    padding: 1.25rem 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: rgba(11, 15, 25, 0.95);
}

.rbos-aq-btn-skip {
    background: none;
    border: none;
    color: var(--aq-text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.rbos-aq-btn-skip:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.rbos-aq-btn-skip.hidden {
    visibility: hidden;
    pointer-events: none;
}

.rbos-aq-btn-continue {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #0b0f19;
    border: none;
    border-radius: 12px;
    padding: 0.85rem 1.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s var(--aq-ease);
}

.rbos-aq-btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.rbos-aq-btn-continue:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success / Completion Screen */
.rbos-aq-complete {
    text-align: center;
    padding: 2.5rem 1rem;
}

.rbos-aq-complete-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: rbos-aq-pulse 2s infinite;
}

.rbos-aq-complete h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.rbos-aq-complete p {
    color: var(--aq-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}
