:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-bg: #1a1c23;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Outfit', sans-serif;
    color: #333;
    overflow-x: hidden;
}

.navbar {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-section {
    position: relative;
    padding: 120px 0;
    background: linear-gradient(180deg, #90caf9 0%, #f5f7fa 100%);
    min-height: 85vh;
    display: flex;
    align-items: center;
    z-index: 1;
}

@media (max-width: 991.98px) {
    .hero-section {
        padding: 60px 0 100px 0;
        min-height: auto;
    }
}

/* Sky Background Elements */
.sky-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.cloud {
    position: absolute;
    fill: #fff;
    opacity: 0.6;
    animation: moveClouds linear infinite;
    filter: blur(2px);
}

@keyframes moveClouds {
    from {
        transform: translateX(-150px);
    }

    to {
        transform: translateX(100vw);
    }
}

/* Mountain Background Elements */
.mountain-bg {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 150px;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.mountain-layer {
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 100%;
    transition: transform 0.5s ease;
}

.mountain-layer-far {
    fill: #a5d6a7;
    opacity: 0.4;
    animation: swayMountains 20s ease-in-out infinite alternate;
}

.mountain-layer-near {
    fill: #81c784;
    opacity: 0.6;
    animation: swayMountains 15s ease-in-out infinite alternate-reverse;
}

@keyframes swayMountains {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(20px);
    }
}

.hero-svg {
    max-width: 100%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Hero Carousel Blending */
.hero-carousel-blend {
    position: relative;
    z-index: 2;
}

.hero-image-container {
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    /* Deeply fused mask for all edges, especially upper and lower */
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 90%);

    /* Enhancing the top/bottom fade specifically */
    mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%),
        linear-gradient(to right, transparent 0%, black 25%, black 75%, transparent 100%);
    -webkit-mask-image: -webkit-linear-gradient(top, transparent 0%, black 25%, black 75%, transparent 100%),
        -webkit-linear-gradient(left, transparent 0%, black 25%, black 75%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
    /* For older webkit browsers */

    animation: float 8s ease-in-out infinite;
}

.hero-image-container img {
    border-radius: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    box-shadow: none;
    filter: saturate(1.1) brightness(1.05);
    /* Slight pop to keep it enchanting */
}

/* Timeline Section Enhancement */
.timeline-section {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    z-index: -1;
    opacity: 0.15;
    animation: drift linear infinite;
    pointer-events: none;
}

.shape-circle {
    border-radius: 50%;
    background: #2196f3;
}

.shape-square {
    background: #7c4dff;
    border-radius: 20%;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, 50px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 80px) rotate(240deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
}

.footer {
    background: var(--dark-bg);
    color: #fff;
    padding: 50px 0;
}

.btn-premium {
    background-color: var(--primary-color);
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    border: none;
    color: white !important;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.btn-premium:hover {
    transform: scale(1.05);
    color: white;
}

.section-padding {
    padding: 80px 0;
}

.nav-link {
    font-weight: 500;
    color: #333;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-pills .nav-link.active {
    color: #fff !important;
    background-color: var(--primary-color);
}

.activity-logs-container {
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-menu {
    z-index: 9999 !important;
    border: none !important;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15) !important;
    animation: fadeIn 0.2s ease-out;
}

/* Enchanting Typography & Colors */
.badge-enchanting {
    background: linear-gradient(45deg, #ff4081, #7c4dff);
    color: white !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.3);
}

.hero-title-enchanting {
    color: #1a237e;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.text-gradient {
    background: linear-gradient(45deg, #6200ea, #03a9f4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(3, 169, 244, 0.2));
}

.text-secondary-enchanting {
    color: #455a64;
    font-size: 1.15rem;
    line-height: 1.7;
}

.carousel-caption {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px !important;
    color: #1a237e !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Layout - Robust Version */
.admin-body {
    height: 100vh;
    overflow: hidden !important;
    background: #f8f9fc;
}

.admin-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
    transition: all 0.3s ease;
}

.admin-sidebar {
    width: 280px;
    min-width: 280px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.admin-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #f8f9fc;
    transition: all 0.3s ease;
}

.topbar {
    height: 70px;
    min-height: 70px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-wrapper.sidebar-collapsed .admin-sidebar {
    margin-left: -280px;
}

/* Mobile Responsive Sidebar */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
    }

    .admin-sidebar.show {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .topbar {
        padding: 0 1rem;
    }
}

.admin-footer {
    background: #fff;
    z-index: 10;
}

/* Fix for auto-scrolling issues */
html,
body {
    scroll-behavior: auto !important;
}

/* Dropdown/Dropup stability */
.admin-sidebar .dropdown-menu {
    width: calc(100% - 20px);
    margin: 0 10px 10px 10px;
}