/*
 * Global Interactive Demos Styling
 * Applies premium depth, highlights, and visual polish to all demo pages
 * Usage: <link rel="stylesheet" href="/css/interactive-demos.css">
 */

/* ========================================
   Base Layout & Background
   ======================================== */

/* Dark gradient background with depth */
body {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%) !important;
    position: relative;
    min-height: 100vh;
}

/* Radial orange glow at top */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: radial-gradient(ellipse at top, rgba(247, 147, 26, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Ensure content appears above background glow */
body > * {
    position: relative;
    z-index: 1;
}

.container,
.wrap,
main {
    position: relative;
    z-index: 1;
}

/* ========================================
   Typography Enhancements
   ======================================== */

/* Gradient text for main headings */
h1 {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    text-shadow: 0 2px 20px rgba(247, 147, 26, 0.3) !important;
}

/* Bright orange to yellow gradient for section headings */
h2 {
    background: linear-gradient(135deg, #ff6b00 0%, #ffeb3b 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 700 !important;
}

/* Subtle gradient for h3 */
h3 {
    color: #e0e0e0 !important;
    font-weight: 600 !important;
}

/* ========================================
   Card & Section Enhancements
   ======================================== */

/* Premium card styling with depth */
.demo-card,
.content-section,
.section-card,
.info-box,
.explanation-box,
[class*="section"]:not(.nav-section):not([class*="subsection"]) {
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.95) 0%, rgba(45, 45, 45, 0.85) 100%) !important;
    backdrop-filter: blur(10px) !important;
    border: 2px solid rgba(247, 147, 26, 0.2) !important;
    border-radius: 1rem !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(247, 147, 26, 0.1) inset !important;
    position: relative !important;
}

/* Gradient top border for sections */
.demo-card::before,
.content-section::before,
.section-card::before,
[class*="section"]:not(.nav-section)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.6) 40%, rgba(255, 235, 59, 0.6) 60%, transparent);
    border-radius: 1rem 1rem 0 0;
}

/* Interactive cards with hover effects */
.card,
.demo-option,
.interactive-card,
[role="button"]:not(button) {
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.9) 0%, rgba(35, 35, 35, 0.9) 100%) !important;
    backdrop-filter: blur(10px) !important;
    border: 2px solid rgba(247, 147, 26, 0.15) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(247, 147, 26, 0.08) inset !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden;
}

.card::before,
.demo-option::before,
.interactive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.1) 40%, rgba(255, 235, 59, 0.1) 60%, transparent);
    transition: left 0.5s ease;
}

.card:hover,
.demo-option:hover,
.interactive-card:hover,
[role="button"]:not(button):hover {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.15) 0%, rgba(255, 235, 59, 0.1) 100%) !important;
    border-color: rgba(255, 107, 0, 0.4) !important;
    transform: translateY(-4px) scale(1.01) !important;
    box-shadow: 0 12px 32px rgba(255, 107, 0, 0.3), 0 0 0 1px rgba(255, 235, 59, 0.2) inset !important;
}

.card:hover::before,
.demo-option:hover::before,
.interactive-card:hover::before {
    left: 100%;
}

/* ========================================
   Button Enhancements
   ======================================== */

/* Primary buttons with shimmer effect */
button,
.btn,
.button,
input[type="submit"],
input[type="button"],
[class*="btn-"]:not([class*="btn-secondary"]):not([class*="btn-outline"]) {
    background: linear-gradient(135deg, #ff6b00 0%, #ffeb3b 100%) !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 0.875rem 1.75rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
    position: relative !important;
    overflow: hidden !important;
}

button::before,
.btn::before,
.button::before,
input[type="submit"]::before,
input[type="button"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover,
.btn:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 28px rgba(255, 107, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
}

button:hover::before,
.btn:hover::before,
.button:hover::before,
input[type="submit"]:hover::before,
input[type="button"]:hover::before {
    left: 100%;
}

button:active,
.btn:active,
.button:active {
    transform: translateY(-1px) scale(1) !important;
}

button:disabled,
.btn:disabled,
.button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Secondary/outline buttons */
[class*="btn-secondary"],
[class*="btn-outline"],
button.secondary {
    background: transparent !important;
    border: 2px solid rgba(255, 107, 0, 0.3) !important;
    color: #e0e0e0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

[class*="btn-secondary"]:hover,
[class*="btn-outline"]:hover,
button.secondary:hover {
    background: rgba(255, 107, 0, 0.1) !important;
    border-color: rgba(255, 235, 59, 0.5) !important;
}

/* ========================================
   Form Input Enhancements
   ======================================== */

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 2px solid rgba(255, 107, 0, 0.2) !important;
    border-radius: 0.5rem !important;
    color: #e0e0e0 !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) inset !important;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: rgba(255, 235, 59, 0.5) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.2) inset !important;
}

/* ========================================
   Special Highlight Boxes
   ======================================== */

/* Success/positive highlights (green) */
.success,
.positive,
.recommended,
[class*="success"],
[class*="positive"] {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.05) 100%) !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
    box-shadow: 0 6px 24px rgba(76, 175, 80, 0.2), 0 0 0 1px rgba(76, 175, 80, 0.15) inset !important;
}

.success::before,
.positive::before,
.recommended::before {
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.6), transparent) !important;
}

/* Info/neutral highlights (blue) */
.info,
.neutral,
[class*="info"],
[class*="note"] {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.12) 0%, rgba(33, 150, 243, 0.06) 100%) !important;
    border-color: rgba(33, 150, 243, 0.3) !important;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.2), 0 0 0 1px rgba(33, 150, 243, 0.1) inset !important;
}

.info::before,
.neutral::before {
    background: linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.6), transparent) !important;
}

/* Warning highlights (yellow) */
.warning,
.caution,
[class*="warning"] {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.12) 0%, rgba(255, 193, 7, 0.06) 100%) !important;
    border-color: rgba(255, 193, 7, 0.3) !important;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.2), 0 0 0 1px rgba(255, 193, 7, 0.1) inset !important;
}

.warning::before,
.caution::before {
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.6), transparent) !important;
}

/* Error/danger highlights (red) */
.error,
.danger,
[class*="error"],
[class*="danger"] {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.06) 100%) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2), 0 0 0 1px rgba(239, 68, 68, 0.1) inset !important;
}

.error::before,
.danger::before {
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.6), transparent) !important;
}

/* ========================================
   Badge & Chip Enhancements
   ======================================== */

.badge,
.chip,
.tag,
[class*="badge"],
[class*="chip"] {
    display: inline-block;
    padding: 0.375rem 0.75rem !important;
    border-radius: 999px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.15) 0%, rgba(255, 235, 59, 0.15) 100%) !important;
    border: 1px solid rgba(255, 107, 0, 0.3) !important;
    color: #ffeb3b !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* ========================================
   Progress & Loading States
   ======================================== */

.progress-bar,
[class*="progress"] {
    background: rgba(45, 45, 45, 0.8) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) inset !important;
}

.progress-fill,
.progress-bar > div,
[class*="progress-fill"] {
    background: linear-gradient(90deg, #ff6b00 0%, #ffeb3b 100%) !important;
    border-radius: 999px !important;
    transition: width 0.3s ease !important;
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.5) !important;
}

/* ========================================
   Accessibility & Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    button::before,
    .btn::before,
    .card::before {
        display: none !important;
    }
}

/* ========================================
   Mobile Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
    body::before {
        height: 250px;
    }

    h1 {
        font-size: 2rem !important;
    }

    button,
    .btn,
    .button {
        padding: 0.75rem 1.5rem !important;
    }

    .demo-card,
    .content-section,
    .section-card {
        padding: 1.5rem !important;
    }
}

