/* ====================================
   MODERN FUTURISTIC MATERIAL DESIGN
   ==================================== */

:root {
    /* Color Palette - Modern & Futuristic */
    --primary-color: #667eea;
    --primary-dark: #4c63d2;
    --primary-light: #8b9eff;
    --secondary-color: #764ba2;
    --accent-color: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.4);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    /* Neutral Colors */
    --bg-primary: #0f0f1e;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.1);
    /* Text Colors */
    --text-primary: #041bf2;
    --text-secondary: #041bf2;
    --text-muted: rgba(255, 255, 255, 0.5);
    /* Shadows & Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
    --shadow-3d: 0 10px 30px rgba(102, 126, 234, 0.3);
    --glow-primary: 0 0 20px rgba(102, 126, 234, 0.5);
    --glow-accent: 0 0 20px rgba(0, 212, 255, 0.5);
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 20px;
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ====================================
   GLOBAL STYLES
   ==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
}

/* ====================================
   GLASSMORPHISM CARDS
   ==================================== */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg), var(--shadow-3d);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl), var(--glow-primary);
    border-color: rgba(102, 126, 234, 0.5);
}

.glass-card:hover::before {
    left: 100%;
}

/* Material Card Variants */
.card-elevated {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(102, 126, 234, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.card-elevated:hover {
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(102, 126, 234, 0.4);
}

/* ====================================
   MODERN NAVIGATION
   ==================================== */

.navbar-modern {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand-modern {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.navbar-brand-modern:hover {
    filter: brightness(1.2);
    text-shadow: var(--glow-primary);
}

.nav-link-modern {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: translateX(-50%);
    transition: width var(--transition-normal);
}

.nav-link-modern:hover {
    color: var(--text-primary) !important;
    background: var(--surface-hover);
}

.nav-link-modern:hover::after {
    width: 80%;
}

/* ====================================
   BUTTONS
   ==================================== */

.btn-material {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 12px;
    color: white;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md), var(--shadow-3d);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Normalize Bootstrap .btn* to material style to keep consistency across views */
.btn, .btn-primary, .btn-success, .btn-danger, .btn-secondary, .btn-warning, .btn-info {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border-radius: 12px;
    border: none !important;
    background: linear-gradient(135deg, var(--primary-color), #4f46e5) !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(79,70,229,0.18), 0 2px 6px rgba(3,7,18,0.08);
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s;
}

.btn:hover, .btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(79,70,229,0.2), 0 6px 14px rgba(3,7,18,0.12);
}

.btn:active {
    transform: translateY(0);
    opacity: .95;
}

/* small buttons */
.btn-sm {
    padding: .25rem .5rem;
    border-radius: 10px;
}

/* Danger variant */
.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626) !important;
}

/* Outline neutral styles for btn-outline-primary used in admin lists */
.btn-outline-primary {
    background: transparent !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(79,70,229,0.12) !important;
    box-shadow: none !important;
}

/* Styles for HTML content stored in `web_contents` */
.web-content {
    --wc-max-width: 900px;
    margin: 0 auto;
    color: var(--text-primary);
    line-height: 1.75;
    font-size: 1rem;
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

.web-content p {
    margin: 1rem 0;
    color: var(--text-secondary);
}

.web-content h1, .web-content h2, .web-content h3, .web-content h4, .web-content h5 {
    margin: 1.25rem 0 0.5rem;
    line-height: 1.2;
    color: var(--text-primary);
    font-weight: 700;
}

.web-content h1 { font-size: 2rem; }
.web-content h2 { font-size: 1.6rem; }
.web-content h3 { font-size: 1.3rem; }

.web-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.web-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(2,6,23,0.08);
}

.web-content ul, .web-content ol {
    margin: 0.75rem 0 0.75rem 1.25rem;
}

.web-content blockquote {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.03);
    border-left: 4px solid rgba(79,70,229,0.12);
    color: var(--text-secondary);
    border-radius: 8px;
}

.web-content pre, .web-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', 'Courier New', monospace;
}

.web-content pre {
    overflow: auto;
    padding: 1rem;
    background: #0b1120;
    color: #e6eef8;
    border-radius: 8px;
    margin: 1rem 0;
}

.web-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.web-content table th, .web-content table td {
    border: 1px solid rgba(255,255,255,0.06);
    padding: 0.5rem 0.75rem;
}

.web-content .wc-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 10px 30px rgba(79,70,229,0.14);
    text-decoration: none;
}

/* make embedded iframes responsive (videos etc) */
.web-content .embed-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.web-content .embed-wrap iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 0;
}

@media (max-width: 768px) {
    .web-content { font-size: 0.98rem; }
    .web-content h1 { font-size: 1.6rem; }
}

.btn-material::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-material:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.btn-material:hover::before {
    width: 300px;
    height: 300px;
}

.btn-material:active {
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), #00a8cc);
    box-shadow: var(--shadow-md), 0 0 20px rgba(0, 212, 255, 0.3);
}

.btn-accent:hover {
    box-shadow: var(--shadow-lg), var(--glow-accent);
}

/* ====================================
   TYPOGRAPHY
   ==================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1 { 
    font-size: 3rem; 
    text-shadow: var(--shadow-lg);
}

h2 { 
    font-size: 2.5rem; 
}

h3 { 
    font-size: 2rem; 
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: var(--glow-primary);
}

/* ====================================
   INPUTS & FORMS
   ==================================== */

.input-material {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
    width: 100%;
}

.input-material:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), var(--glow-primary);
    background: var(--surface-hover);
}

.input-material::placeholder {
    color: var(--text-muted);
}

/* ====================================
   HERO SECTION
   ==================================== */

.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   CONTENT SECTIONS
   ==================================== */

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    box-shadow: var(--glow-primary);
}

/* ====================================
   3D EFFECTS & ANIMATIONS
   ==================================== */

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.rotate-3d {
    transition: transform var(--transition-slow);
}

.rotate-3d:hover {
    transform: perspective(1000px) rotateY(10deg) rotateX(5deg);
}

.scale-3d {
    transition: transform var(--transition-normal);
}

.scale-3d:hover {
    transform: scale(1.05) translateZ(20px);
}

/* ====================================
   GRID LAYOUTS
   ==================================== */

.grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* ====================================
   UTILITY CLASSES
   ==================================== */

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ====================================
   SCROLLBAR STYLING
   ==================================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    box-shadow: var(--glow-primary);
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .grid-modern {
        grid-template-columns: 1fr;
    }
    
    .glass-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-material {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ====================================
   LOADING & TRANSITIONS
   ==================================== */

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
