/* Space Theme CSS for Cosmic Hub */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #7e22ce 50%, #db2777 75%, #f97316 100%);
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Static stars background */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="2" height="2"><circle cx="1" cy="1" r="1" fill="white" opacity="0.8"/></svg>') repeat;
}

.stars2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="3" height="3"><circle cx="1.5" cy="1.5" r="1" fill="white" opacity="0.5"/></svg>') repeat;
}

.stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><circle cx="2" cy="2" r="1.5" fill="white" opacity="0.3"/></svg>') repeat;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 60px rgba(139, 92, 246, 0.6);
    font-weight: 700;
}

nav .login-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    padding: 14px 35px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.05em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
}

nav .login-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.7);
    background: linear-gradient(135deg, #fbbf24 0%, #f87171 100%);
}

/* Hero section */
.hero {
    text-align: center;
    padding: 60px 20px;
}

.hero h2 {
    font-size: 3.2em;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #fbbf24, #f472b6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.4em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 50px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 35px;
    transition: all 0.4s ease;
}

.feature:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.feature h3 {
    color: #fbbf24;
    font-size: 1.6em;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.feature p {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
    font-size: 1.05em;
}

/* Footer */
.footer, footer {
    text-align: center;
    padding: 30px;
    margin-top: 80px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95em;
}

/* Loading spinner */
.loading-spinner {
    width: 90px;
    height: 90px;
    border: 10px solid rgba(251, 191, 36, 0.2);
    border-top: 10px solid #fbbf24;
    border-right: 10px solid #f472b6;
    border-radius: 50%;
    margin: 40px auto;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Forms */
form {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 45px;
    max-width: 520px;
    margin: 40px auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

label {
    display: block;
    margin-bottom: 22px;
    color: #ffffff;
    font-size: 1.15em;
    font-weight: 600;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 1.05em;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #fbbf24;
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

button[type="submit"] {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    padding: 16px 45px;
    border: none;
    border-radius: 30px;
    font-size: 1.15em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.5);
}

button[type="submit"]:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.7);
    background: linear-gradient(135deg, #fbbf24 0%, #f87171 100%);
}

/* Flag display */
.flag {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(244, 114, 182, 0.3));
    border: 3px solid #fbbf24;
    border-radius: 20px;
    padding: 35px;
    margin: 35px auto;
    text-align: center;
    font-size: 1.7em;
    color: #fbbf24;
    font-weight: 900;
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.6), 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 650px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Error messages */
.error {
    background: rgba(239, 68, 68, 0.25);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 18px;
    color: #fef2f2;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Success welcome message */
h2 {
    color: #fbbf24;
    margin-bottom: 25px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

/* Auth / login + redirect helpers (consolidated from inline styles) */
.auth-title {
    text-align: center;
    color: #fbbf24;
    margin: 50px 0 10px;
    font-size: 2.6em;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.6);
}
.form-subtitle { text-align: center; margin-bottom: 30px; color: rgba(255,255,255,0.9); }
.success-panel { text-align: center; padding: 50px 20px; }
.success-panel h2 {
    font-size: 2.8em;
    background: linear-gradient(135deg, #fbbf24, #f472b6);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.success-panel .lead { font-size: 1.3em; color: rgba(255,255,255,0.9); margin-bottom: 30px; }
.success-panel .note { margin-top: 30px; color: rgba(255,255,255,0.8); }
.center { text-align: center; }
.redirect-screen { text-align: center; padding-top: 100px; }
.redirect-screen .title {
    color: #fbbf24; margin-bottom: 40px; font-size: 2.5em;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.6);
}
.redirect-screen .sub { font-size: 1.3em; color: rgba(255,255,255,0.9); margin-bottom: 60px; }
.redirect-screen .status { color: #f472b6; font-size: 1.2em; margin-top: 50px; }

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .hero h2 {
        font-size: 2em;
    }
    
    .hero p {
        font-size: 1.1em;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
}
