/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    /* Fallbacks in case DB fails */
    --primary: #0d6efd;
    --primary-rgb: 13, 110, 253;
    --primary-glow: rgba(var(--primary-rgb), 0.35);
    --purple-glow: rgba(111, 66, 193, 0.25);
    --dark-bg: #0f172a; 
    --glass-bg: rgba(255, 255, 255, 0.03); 
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc; 
    --text-muted: #94a3b8;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative; 
}

html { scroll-behavior: smooth; }

h1, h2, h3, h4, h5, h6, p, span, div, td, th { color: var(--text-main); }
.text-muted { color: var(--text-muted) !important; }

body::before, body::after {
    content: '';
    position: fixed;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1; 
    animation: float 20s infinite ease-in-out alternate;
    pointer-events: none;
}

body::before {
    top: -10%;
    left: -10%;
    background: var(--primary-glow);
}

body::after {
    bottom: -10%;
    right: -10%;
    background: var(--purple-glow);
    animation-delay: -10s; 
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5vw, 5vh) scale(1.1); }
}

.glass-panel, .card-3d, .admin-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: var(--text-main) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-3d:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255,255,255,0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.form-control, .form-select, .form-control-glass {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    backdrop-filter: blur(10px);
    border-radius: 12px;
}

.form-control::placeholder { color: rgba(255, 255, 255, 0.4) !important; }

.form-control:focus, .form-select:focus {
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2) !important;
}


.form-select option {
    background-color: #0f172a !important; 
    color: #ffffff !important; 
}


.form-select {
    color-scheme: dark;
}

.liquid-glass-nav {
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    padding: 12px 0;
}

.fluid-link {
    position: relative;
    padding: 10px 24px !important;
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    transition: color 0.3s ease;
    z-index: 1;
}

.fluid-link i {
    font-size: 1.2rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

.fluid-link::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) scaleY(0);
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.25), rgba(var(--primary-rgb), 0.05));
    border-radius: 50px;
    z-index: -1;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom;
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    box-shadow: inset 0 0 15px rgba(var(--primary-rgb), 0.2);
}

.fluid-link:hover { color: #ffffff !important; }
.fluid-link:hover i { transform: translateY(-2px) scale(1.1); color: var(--text-main); }
.fluid-link:hover::before { top: 0; transform: translateX(-50%) scaleY(1); }

.fluid-link.active {
    color: #ffffff !important;
    background: rgba(var(--primary-rgb), 0.15);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    box-shadow: inset 0 0 10px rgba(var(--primary-rgb), 0.2);
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 20px;
        border-radius: 15px;
        margin-top: 15px;
        border: 1px solid var(--glass-border);
    }
}

.story-path-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.story-path-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50px; 
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--purple-glow), var(--primary));
    border-radius: 10px;
    box-shadow: 0 0 15px var(--primary-glow);
}

.story-node {
    position: relative;
    padding-left: 100px; 
    margin-bottom: 50px;
}

.story-node::before {
    content: '';
    position: absolute;
    left: 42px; 
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--dark-bg);
    border: 4px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 10px var(--primary);
    transition: all 0.3s ease;
}

.story-node:hover::before {
    background: var(--primary);
    transform: scale(1.3);
}

[dir="rtl"] .story-path-container::before { left: auto; right: 50px; }
[dir="rtl"] .story-node { padding-left: 0; padding-right: 100px; }
[dir="rtl"] .story-node::before { left: auto; right: 42px; }

.hover-text-primary:hover { color: var(--primary) !important; }

@media (hover: hover) and (pointer: fine) {
    body, html { cursor: url('../img/custom-cursor.png'), auto !important; }
    a, button, input[type="submit"], input[type="button"], .btn, .fluid-link { cursor: url('../img/custom-pointer.png'), pointer !important; }
    input[type="text"], input[type="email"], textarea, input[type="password"] { cursor: text !important; }
}