/* Starscape Dark Mode Theme - Universal Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Dark Theme */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --glass-bg: rgba(26, 26, 26, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-glow: rgba(59, 130, 246, 0.3);
}

/* Global Dark Mode Base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Starscape Background */
.starscape-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: starscape 20s linear infinite;
}

/* Star.jpg Background Layer */
.star-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('../sitegfx/star.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    filter: brightness(0.8) contrast(1.2);
}

/* Starscape Animation */
@keyframes starscape {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-200px);
    }
}

/* Floating Stars Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.floating-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.floating-stars::before,
.floating-stars::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ffffff 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-stars::before {
    top: 20%;
    left: 20%;
    animation-delay: -2s;
}

.floating-stars::after {
    top: 60%;
    right: 20%;
    animation-delay: -4s;
}

/* Glassmorphism Effects */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-card {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.glass-header {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Enhanced Dark Mode Components */
.dark-button {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.dark-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.dark-input {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dark-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    background: rgba(26, 26, 26, 0.9);
}

/* Dark Mode Text Styles */
.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

/* Gradient Text Effects */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 50%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-blue {
    background: linear-gradient(135deg, var(--accent-blue), #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeInScale {
    animation: fadeInScale 0.7s ease-out forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.5s ease-out forwards;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Dark Mode Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

/* Responsive Design */
@media (max-width: 768px) {
    .starscape-bg {
        background-size: 150px 75px;
    }
    
    .floating-stars::before,
    .floating-stars::after {
        width: 3px;
        height: 3px;
    }
}

/* Print Styles */
@media print {
    .starscape-bg,
    .star-bg,
    .floating-stars {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1a1a1a;
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
        --glass-bg: rgba(0, 0, 0, 0.9);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .starscape-bg {
        animation: none;
    }
    
    .floating-stars::before,
    .floating-stars::after {
        animation: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Selection Styles */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}
