/* Base styles for the site */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Dark overlay for readability */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 43, 78, 0.5);
    pointer-events: none;
    z-index: -1;
}

/* Top Navigation */
nav {
    background: rgba(3, 3, 5, 0.6);
    backdrop-filter: blur(5px);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    position: relative;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.logo {
    display: block;
    margin-bottom: 1rem;
    text-decoration: none;
    filter: drop-shadow(0 0 50px rgba(255, 255, 255, 0.7));
    transition: all 0.3s ease;
}

.logo img {
    height: 100px;
    width: auto;
    max-width: 500px;
}

.logo:hover {
    filter: drop-shadow(0 0 25px rgba(203, 196, 200, 0.8));
    transform: scale(1.25);
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #e2e8f0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.nav-links a:hover {
    color: #a6a2ae;
    background: rgba(139, 92, 246, 0.1);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.nav-links a.active {
    color: #c4f8d2;
    background: rgba(139, 92, 246, 0.2);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: rgba(32, 32, 78, 0.6);
    backdrop-filter: blur(5px);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main content area */
main {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Common container styles for content */
.content-box {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 10px 10px -5px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.content-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(157, 157, 157, 0.6), transparent);
}

/* Typography */
h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: whitesmoke;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    background: whitesmoke;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    color: whitesmoke;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    color: whitesmoke;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    margin-top: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 25px -5px rgba(139, 92, 246, 0.3),
        0 10px 10px -5px rgba(236, 72, 153, 0.2);
}

/* Footer */
footer {
    background: rgba(3, 3, 5, 0.6);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(226, 232, 240, 0.1);
    padding: 2rem 0;
    text-align: center;
    color: #94a3b8;
    margin-top: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .logo img {
        height: 75px;
        max-width: 400px;
    }
    
    .logo {
        margin-bottom: 0.75rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .nav-links a {
        padding: 0.75rem 1.5rem;
        width: 200px;
        text-align: center;
    }

    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .content-box {
        padding: 1.5rem;
    }
}

/* Background image adjustments for different screen sizes */
@media (max-width: 480px) {
    body {
        background-size: cover;
        background-attachment: scroll; /* Better performance on mobile */
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 15, 35, 0.8);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #db2777);
}

/* Dynamic background system */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.background-image.active {
    opacity: 1;
    z-index: 2;
}

.background-image.fading-out {
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s ease-out;
}

/* Fallback background */
body {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3a 100%) !important;
}

/* Remove static fallback - let JS handle everything */
.background-container.loading {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3a 50%, #2d1b69 100%);
}

@media (max-width: 480px) {
    .background-image {
        background-attachment: scroll; /* Better performance on mobile */
    }
}