/* ========================================
   CSS VARIABLES & ROOT CONFIGURATION
   ======================================== */
:root {
    /* Glass UI Colors */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    /* Theme Colors */
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --dark: #1a1a2e;
    --light: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    
    /* Blur Strengths */
    --blur-light: blur(10px);
    --blur-medium: blur(20px);
    --blur-heavy: blur(40px);
    
    /* Animations */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--light);
    background: var(--dark);
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('icons/logo-square-transparent.png') center/cover,
                var(--gradient-dark);
    background-blend-mode: overlay;
    opacity: 0.3;
    z-index: -1;
    animation: breathe 20s ease-in-out infinite;
}

/* Floating particles effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 87, 108, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    z-index: -1;
    animation: float 30s ease-in-out infinite;
}

/* ========================================
   GLASS UI UTILITY CLASSES
   ======================================== */
.glass-panel {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.3);
}

.frosted-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

/* ========================================
   WIKI CONTAINER
   ======================================== */
.wiki-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    width: 320px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition-smooth);
    z-index: 1000;
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    background: var(--gradient-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.toggle-btn {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: var(--blur-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Search Container */
.search-container {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    font-size: 0.95rem;
    color: var(--light);
    transition: var(--transition-smooth);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Navigation Content */
.nav-content {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out backwards;
}

.nav-section:nth-child(1) { animation-delay: 0.1s; }
.nav-section:nth-child(2) { animation-delay: 0.2s; }
.nav-section:nth-child(3) { animation-delay: 0.3s; }

.nav-section-title {
    padding: 0.75rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
}

.nav-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: var(--transition-smooth);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    padding-left: 2rem;
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item.active {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
}

.nav-item.active::before {
    transform: scaleY(1);
    width: 100%;
}

.nav-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.content {
    flex: 1;
    margin-left: 320px;
    padding: 2rem;
    transition: var(--transition-smooth);
    position: relative;
}

.content-header {
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--gradient-primary);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.content-header h1 {
    font-size: 3rem;
    color: white;
    font-weight: 800;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-body {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    min-height: 600px;
    animation: fadeIn 1s ease-out;
}

/* ========================================
   CONTENT STYLING
   ======================================== */
.content-body h2 {
    font-size: 2.2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--light);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    animation: fadeInUp 0.6s ease-out;
}

.content-body h3 {
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
    font-weight: 600;
}

.content-body p {
    margin-bottom: 1.5rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
}

.content-body ul, .content-body ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.content-body li {
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
}

.content-body li strong {
    color: var(--accent);
    font-weight: 600;
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
    animation: fadeInUp 0.8s ease-out;
}

.content-body img:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 60px rgba(102, 126, 234, 0.4);
}

.content-body a {
    color: var(--primary);
    text-decoration: none;
    position: relative;
    transition: var(--transition-smooth);
}

.content-body a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
}

.content-body a:hover {
    color: var(--accent);
}

.content-body a:hover::after {
    width: 100%;
}

/* ========================================
   IMAGE GALLERY
   ======================================== */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.gallery-item {
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition-bounce);
    animation: fadeInUp 0.6s ease-out backwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    border-color: var(--primary);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin: 0;
    transition: var(--transition-smooth);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    padding: 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: var(--blur-light);
    text-align: center;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ========================================
   INFO BOX
   ======================================== */
.info-box {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
    animation: fadeInUp 0.8s ease-out, floatGentle 6s ease-in-out infinite;
}

.info-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: rotate 15s linear infinite;
}

.info-box h3 {
    color: white;
    margin-top: 0;
    position: relative;
    z-index: 1;
    font-size: 1.6rem;
}

.info-box p, .info-box ul {
    position: relative;
    z-index: 1;
}

.info-box ul {
    margin-left: 1.5rem;
}

/* ========================================
   CODE BLOCKS
   ======================================== */
.content-body code {
    background: rgba(102, 126, 234, 0.15);
    backdrop-filter: var(--blur-light);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.content-body pre {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: var(--blur-medium);
    color: #f7fafc;
    padding: 1.5rem;
    border-radius: 16px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.content-body pre code {
    background: none;
    padding: 0;
    border: none;
    color: #f7fafc;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

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

    .toggle-btn {
        display: block;
    }

    .content {
        margin-left: 0;
        padding: 1rem;
    }

    .content-header {
        padding: 1.5rem;
    }

    .content-header h1 {
        font-size: 2rem;
    }

    .content-body {
        padding: 1.5rem;
    }

    .logo {
        max-width: 140px;
    }

    .image-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ========================================
   LOADING & NO RESULTS
   ======================================== */
.loading, .no-results {
    text-align: center;
    padding: 4rem;
    color: rgba(255, 255, 255, 0.6);
}

.loading::after {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    margin: 2rem auto;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.no-results h3 {
    margin-bottom: 1rem;
    color: var(--light);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatGentle {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animate-in class for scroll-triggered animations */
.animate-in {
    animation: fadeInUp 0.8s ease-out !important;
}

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

#supportSection iframe {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

