/* Cosmic/Nebula Theme CSS */

/* ========================================
   GOOGLE FONTS IMPORT
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* ========================================
   CSS VARIABLES - COSMIC THEME COLORS
   ======================================== */
:root {
    /* Core Colors */
    --cosmic-void: #000000;
    --cosmic-black: #000000;
    --cosmic-deep-space: #8b4513;
    --cosmic-midnight: #a0522d;
    
    /* Nebula Colors */
    --nebula-golden-orange: #ff8c00;
    --nebula-orange: #ffa500;
    --nebula-red-orange: #ff4500;
    --nebula-deep-blue: #00008b;
    --nebula-dark-blue: #000080;
    
    /* Space Colors */
    --space-brown: #8b4513;
    --space-maroon: #a0522d;
    --star-white: #ffffff;
    --star-blue: #add8e6;
    
    /* Accent Colors */
    --cosmic-cyan: #00d4ff;
    --cosmic-gold: #b8860b;
    --cosmic-purple: #8a2be2;
    --cosmic-magenta: #ff00ff;
    
    /* Text Colors */
    --text-light: #ffffff;
    --text-gray: #d0d0d0;
    
    /* Glass Effects */
    --glass-bg: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    background: #000000;
    color: var(--text-light);
    font-family: 'Consolas', 'Monaco', 'Courier New', 'Lucida Console', monospace;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========================================
   BACKGROUND & NEBULA EFFECTS
   ======================================== */
/* Real Nebula Background Image - High-Quality Astronomical Photo */
.cosmic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    z-index: -1;
    /* Primary nebula image - desktop version */
    background-image: url('../images/backgrounds/Vibrant_Nebula_Optimized_desktop.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: brightness(0.9) contrast(1.1) saturate(1.05);
    animation: nebulaFloat 60s ease-in-out infinite;
    /* Fallback gradient nebula - vibrant colors */
    background-image: 
        url('../images/backgrounds/Vibrant_Nebula_Optimized_desktop.jpg'),
        radial-gradient(ellipse 800px 600px at 30% 70%, rgba(255, 69, 0, 0.8) 0%, rgba(255, 140, 0, 0.6) 30%, transparent 70%),
        radial-gradient(ellipse 600px 400px at 70% 30%, rgba(0, 191, 255, 0.7) 0%, rgba(30, 144, 255, 0.5) 40%, transparent 80%),
        radial-gradient(ellipse 1000px 800px at 50% 50%, rgba(255, 165, 0, 0.4) 0%, rgba(255, 69, 0, 0.3) 50%, transparent 85%),
        radial-gradient(ellipse 500px 300px at 60% 40%, rgba(0, 191, 255, 0.6) 0%, rgba(30, 144, 255, 0.4) 50%, transparent 80%),
        radial-gradient(ellipse 400px 200px at 80% 60%, rgba(0, 191, 255, 0.5) 0%, transparent 70%),
        linear-gradient(135deg, #000000 0%, #0a0a0a 30%, #000000 100%);
}

/* Responsive Nebula Background Images */
/* Tablet and smaller screens */
@media (max-width: 1024px) {
    .cosmic-background {
        background-image: 
            url('../images/backgrounds/Vibrant_Nebula_Optimized_tablet.jpg'),
            radial-gradient(ellipse 600px 400px at 30% 70%, rgba(255, 69, 0, 0.7) 0%, rgba(255, 140, 0, 0.5) 30%, transparent 70%),
            radial-gradient(ellipse 400px 300px at 70% 30%, rgba(0, 191, 255, 0.6) 0%, rgba(30, 144, 255, 0.4) 40%, transparent 80%),
            linear-gradient(135deg, #000000 0%, #0a0a0a 30%, #000000 100%);
        background-attachment: scroll; /* Better performance on tablets */
        filter: brightness(0.92) contrast(1.08) saturate(1.03);
    }
}

/* Mobile landscape and portrait */
@media (max-width: 768px) {
    .cosmic-background {
        background-image: 
            url('../images/backgrounds/Vibrant_Nebula_Optimized_mobile.jpg'),
            radial-gradient(ellipse 400px 300px at 30% 70%, rgba(255, 69, 0, 0.6) 0%, rgba(255, 140, 0, 0.4) 30%, transparent 70%),
            radial-gradient(ellipse 300px 200px at 70% 30%, rgba(0, 191, 255, 0.5) 0%, rgba(30, 144, 255, 0.3) 40%, transparent 80%),
            linear-gradient(135deg, #000000 0%, #0a0a0a 30%, #000000 100%);
        background-attachment: scroll; /* Better performance on mobile */
        filter: brightness(0.95) contrast(1.05) saturate(1.02);
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .cosmic-background {
        background-image: 
            url('../images/backgrounds/Vibrant_Nebula_Optimized_mobile_small.jpg'),
            radial-gradient(ellipse 300px 200px at 30% 70%, rgba(255, 69, 0, 0.5) 0%, rgba(255, 140, 0, 0.3) 30%, transparent 70%),
            radial-gradient(ellipse 200px 150px at 70% 30%, rgba(0, 191, 255, 0.4) 0%, rgba(30, 144, 255, 0.2) 40%, transparent 80%),
            linear-gradient(135deg, #000000 0%, #0a0a0a 30%, #000000 100%);
        filter: brightness(1) contrast(1) saturate(1);
    }
}

/* ========================================
   STARFIELD ANIMATION
   ======================================== */
/* Twinkling Stars */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.star {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle 6s ease-in-out infinite;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

.star:nth-child(odd) {
    background: #add8e6;
    box-shadow: 0 0 5px rgba(173, 216, 230, 0.9);
    animation-delay: 3s;
}

.star:nth-child(3n) {
    background: #ffffff;
    box-shadow: 0 0 3px rgba(255, 255, 255, 1);
    animation-delay: 2s;
}

.star:nth-child(5n) {
    background: #87ceeb;
    box-shadow: 0 0 4px rgba(135, 206, 235, 0.7);
    animation-delay: 4s;
}

.star:nth-child(7n) {
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 1.2);
    animation-delay: 1s;
}

/* ========================================
   ANIMATIONS & KEYFRAMES
   ======================================== */
/* Animations - Subtle Nebula Image Movement */
@keyframes nebulaFloat {
    0%, 100% { 
        background-position: center center;
        filter: brightness(0.9) contrast(1.1) saturate(1.05) hue-rotate(0deg);
    }
    25% { 
        background-position: 51% 49%;
        filter: brightness(0.92) contrast(1.12) saturate(1.07) hue-rotate(1deg);
    }
    50% { 
        background-position: 49% 51%;
        filter: brightness(0.95) contrast(1.15) saturate(1.1) hue-rotate(2deg);
    }
    75% { 
        background-position: 50% 50%;
        filter: brightness(0.92) contrast(1.12) saturate(1.07) hue-rotate(1deg);
    }
}

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.6; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.3);
    }
}

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

/* ========================================
   NAVIGATION & HEADER
   ======================================== */
/* Glassmorphism Navbar - Darker */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

/* Navbar Toggler Styling */
.navbar-toggler {
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand {
    color: var(--text-light) !important;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 0 8px rgba(0, 168, 204, 0.4);
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    text-shadow: 0 0 15px rgba(0, 168, 204, 0.7);
    transform: scale(1.05);
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 1px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cosmic-cyan), var(--cosmic-gold));
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: var(--cosmic-cyan) !important;
    text-shadow: 0 0 8px rgba(0, 168, 204, 0.5);
}

/* ========================================
   HERO SECTION
   ======================================== */
/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 2rem;
    overflow-x: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-light), var(--cosmic-cyan), var(--cosmic-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 25px rgba(0, 168, 204, 0.2);
    animation: glow 4s ease-in-out infinite alternate;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

@keyframes glow {
    0% { filter: brightness(0.9); }
    100% { filter: brightness(1.1); }
}

/* ========================================
   BUTTONS & INTERACTIVE ELEMENTS
   ======================================== */
/* Buttons with Cosmic Effects */
.btn-cosmic {
    background: linear-gradient(135deg, var(--cosmic-cyan), var(--cosmic-purple));
    border: none;
    color: var(--text-light);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-cosmic::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-cosmic:hover::before {
    left: 100%;
}

.btn-cosmic:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 168, 204, 0.4);
    background: linear-gradient(135deg, var(--cosmic-gold), var(--cosmic-magenta));
}

/* ========================================
   CONTENT CARDS & LAYOUT
   ======================================== */
/* Content Cards */
.cosmic-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.cosmic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 168, 204, 0.15);
    border-color: rgba(0, 168, 204, 0.25);
}

/* ========================================
   TYPOGRAPHY & TEXT STYLES
   ======================================== */
/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 1rem;
}

h2 {
    color: var(--cosmic-cyan);
    text-shadow: 0 0 8px rgba(0, 168, 204, 0.2);
}

p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

a {
    color: var(--cosmic-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--cosmic-gold);
    text-shadow: 0 0 8px rgba(184, 134, 11, 0.5);
}

/* Links with Glow Effect */
.link-glow {
    position: relative;
    transition: all 0.3s ease;
}

.link-glow::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cosmic-gold);
    transition: width 0.3s ease;
}

.link-glow:hover::after {
    width: 100%;
}

/* ========================================
   FOOTER
   ======================================== */
/* Footer */
.footer {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    color: var(--text-gray);
}

.social-icons a {
    color: var(--text-gray);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--cosmic-cyan);
    transform: scale(1.2);
    text-shadow: 0 0 12px rgba(0, 168, 204, 0.6);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        line-height: 1.4;
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .cosmic-card {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-collapse {
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 10px;
        margin-top: 0.5rem;
        padding: 1rem;
        border: 1px solid var(--glass-border);
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
        border-radius: 5px;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background: rgba(0, 212, 255, 0.1);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.3;
        padding: 0 0.5rem;
    }
    
    .hero-content {
        padding: 0 0.5rem;
    }
    
    .cosmic-card {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
}

/* ========================================
   FORMS & INPUT STYLING
   ======================================== */
/* Form Styling */
.form-control {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-light) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-control:focus {
    background: var(--glass-bg) !important;
    border-color: var(--cosmic-cyan) !important;
    color: var(--text-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.25) !important;
}

.form-control::placeholder {
    color: var(--text-gray) !important;
}

.input-group-text {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-light) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Pagination */
.pagination .page-link {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-light) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.pagination .page-link:hover {
    background: var(--cosmic-cyan) !important;
    border-color: var(--cosmic-cyan) !important;
    color: var(--cosmic-black) !important;
}

.pagination .page-item.active .page-link {
    background: var(--cosmic-cyan) !important;
    border-color: var(--cosmic-cyan) !important;
    color: var(--cosmic-black) !important;
}
