/* Galaxy-themed Homepage Styling for WorldCreator */
/* Mystical Intro Aesthetic - Calibri Font + Cyan/Purple Theme */

/* WebGL Galaxy Background */
.galaxy-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#galaxyCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

:root {
    --background-dark: #000000;
    --background-darker: #000000;
    --text-primary: #e0e0ff;
    --text-secondary: #8888aa;
    --accent-primary: #00ffff;
    --accent-secondary: #9c27b0;
    --accent-tertiary: #00ffc8;
    --glow-primary: rgba(0, 255, 255, 0.8);
    --glow-secondary: rgba(156, 39, 176, 0.8);
    --transition-slow: 0.5s ease;
    --transition-normal: 0.3s ease;
    --transition-fast: 0.1s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    margin: 1px;
    width: 100%;
    height: 100%;
    font-family: 'Calibri', 'Arial', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

.cosmos-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Authentication Header */
.auth-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 60px;
    background-color: rgba(10, 10, 24, 0.95);
    border-bottom: 1px solid rgba(100, 181, 246, 0.2);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 30px;
    z-index: 100;
    backdrop-filter: blur(5px);
}

/* Tutorial Button */
.tutorial-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    margin-right: 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--accent-tertiary);
    background-color: transparent;
    color: var(--accent-tertiary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.tutorial-btn:hover {
    background-color: rgba(77, 182, 172, 0.15);
    box-shadow: 0 0 15px rgba(77, 182, 172, 0.3);
    transform: scale(1.05);
}

.tutorial-btn:active {
    transform: scale(0.98);
}

.tutorial-icon {
    font-size: 10px;
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

#userGreeting {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

#userName {
    color: var(--accent-primary);
    font-weight: 600;
    margin-left: 5px;
}

.auth-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.login-btn {
    background-color: var(--accent-primary);
    color: white;
    box-shadow: 0 0 15px rgba(100, 181, 246, 0.4);
}

.login-btn:hover {
    background-color: #42a5f5;
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.6);
    transform: scale(1.05);
}

.logout-btn {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--accent-primary);
}

.logout-btn:hover {
    background-color: rgba(100, 181, 246, 0.1);
    color: var(--accent-primary);
}

/* Login Prompt */
.login-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(6, 6, 17, 0.95), rgba(10, 10, 30, 0.95));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    padding: 20px;
}

.login-prompt-content {
    text-align: center;
    max-width: 500px;
    background: linear-gradient(180deg, rgba(100, 181, 246, 0.05), rgba(126, 87, 194, 0.05));
    border: 1px solid rgba(100, 181, 246, 0.2);
    border-radius: 20px;
    padding: 60px 40px;
    backdrop-filter: blur(10px);
}

.login-prompt-content h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.login-prompt-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.login-btn-large {
    background-color: var(--accent-primary);
    color: white;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(100, 181, 246, 0.4);
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.login-btn-large:hover {
    background-color: #42a5f5;
    box-shadow: 0 6px 30px rgba(100, 181, 246, 0.6);
    transform: translateY(-2px);
}

.login-btn-large:active {
    transform: translateY(0);
    box-shadow: 0 2px 15px rgba(100, 181, 246, 0.5);
}

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.7;
}

.auth-divider span {
    background-color: rgba(10, 10, 24, 0.95);
    padding: 0 10px;
    position: relative;
    z-index: 2;
}

.auth-divider::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.3), transparent);
    left: 10%;
    z-index: 1;
}

.continue-btn-large {
    background-color: rgba(126, 87, 194, 0.8);
    color: white;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(126, 87, 194, 0.4);
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.continue-btn-large:hover {
    background-color: rgba(126, 87, 194, 1);
    box-shadow: 0 6px 30px rgba(126, 87, 194, 0.6);
    transform: translateY(-2px);
}

.continue-btn-large:active {
    transform: translateY(0);
    box-shadow: 0 2px 15px rgba(126, 87, 194, 0.5);
}

/* Adjust main content layout to account for auth header */
.homepage-content {
    margin-top: 60px;
    padding-top: 20px;
}

/* Stats section display tweaks */
.cosmic-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 600px;
    margin-bottom: 50px;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background-darker);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.loading-text {
    font-size: 24px;
    color: var(--text-primary);
    margin-top: 20px;
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

/* Star Background */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.star {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.7;
    animation: twinkle 3s infinite alternate;
}

.star.small {
    width: 1px;
    height: 1px;
}

.star.medium {
    width: 2px;
    height: 2px;
}

.star.large {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.6);
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Main Content */
.homepage-content {
    display: flex;
    flex-direction: column;
    align-items: center;

    /* THIS FIXES THE HEADER OVERLAP */
    margin: 60px auto 0;
    padding: 40px 20px;
    padding-top: 20px;

    max-width: 1200px;
    position: relative;
    z-index: 1;
}

/* Header */
.cosmic-header {
    text-align: center;
    margin-bottom: 40px;
}

.cosmic-title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-primary);
    /* Removed neon text shadow */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.title-icon {
    margin-right: 15px;
    font-size: 4.5rem;
}

.cosmic-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Section */
.cosmic-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 800px;
    margin-bottom: 50px;
}

.stat-orb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(100, 181, 246, 0.3), rgba(100, 181, 246, 0.1));
    border-radius: 50%;
    width: 120px;
    height: 120px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(100, 181, 246, 0.5), inset 0 0 20px rgba(100, 181, 246, 0.3);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-orb:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.8), inset 0 0 25px rgba(100, 181, 246, 0.4);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    /* Removed neon text shadow */
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Create New World Section */
.creation-portal {
    margin-bottom: 60px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cosmic-btn {
    position: relative;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    background: var(--accent-primary); /* Solid color instead of gradient */
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.cosmic-btn:hover {
    transform: scale(1.05);
}

.cosmic-btn:active {
    transform: scale(0.98);
}

.create-world-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: #607d8b; /* Grey-blue color */
    box-shadow: 0 4px 12px rgba(96, 125, 139, 0.4);
}

.create-world-btn:hover {
    background: #546e7a; /* Slightly darker on hover */
    box-shadow: 0 6px 16px rgba(96, 125, 139, 0.6);
}

.create-world-btn:active {
    background: #455a64; /* Even darker when clicked */
    box-shadow: 0 2px 8px rgba(96, 125, 139, 0.5);
}

.play-now-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #8a2be2, #6b21a8); /* Purple gradient */
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.4);
}

.play-now-btn:hover {
    background: linear-gradient(135deg, #9b3ce3, #7c32b9); /* Slightly brighter on hover */
    box-shadow: 0 6px 16px rgba(138, 43, 226, 0.6);
}

.play-now-btn:active {
    background: linear-gradient(135deg, #7a1db5, #5a1a8f); /* Darker when clicked */
    box-shadow: 0 2px 8px rgba(138, 43, 226, 0.5);
}

.btn-icon {
    margin-right: 8px;
}

.btn-cosmic-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.cosmic-btn:hover .btn-cosmic-glow {
    opacity: 0.3;
}

/* Galaxy Visualization */
.worlds-galaxy {
    width: 100%;
    position: relative;
}

.galaxy-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text-primary);
    /* Removed neon text shadow */
}

.galaxy-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 280px); /* Dynamic height based on viewport */
    min-height: 500px;
    max-height: 900px;
    max-width: 1400px; /* Much wider */
    margin: 0 auto;
    border-radius: 30px;
    background: linear-gradient(to bottom, rgba(6, 6, 17, 0.7), rgba(10, 10, 30, 0.5));
    box-shadow: 0 0 40px rgba(100, 181, 246, 0.2);
    overflow: hidden;
    border: 1px solid rgba(100, 181, 246, 0.1);
    backdrop-filter: blur(3px);
}

.galaxy-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.galaxy-core {
    width: 70px;
    height: 70px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.95), rgba(126, 87, 194, 0.8) 30%, rgba(100, 181, 246, 0.4) 60%, transparent);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(126, 87, 194, 0.9), 0 0 80px rgba(100, 181, 246, 0.6);
    animation: pulseCore 4s infinite ease-in-out;
}

@keyframes pulseCore {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.orbit-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.orbit-1 { width: 220px; height: 220px; }
.orbit-2 { width: 400px; height: 400px; }
.orbit-3 { width: 580px; height: 580px; }
.orbit-4 { width: 760px; height: 760px; }
.orbit-5 { width: 940px; height: 940px; }

/* Planet Styling - ENHANCED for better responsiveness */
.world-planet {
    position: absolute;
    /* Faster transition for more immediate response */
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                filter 0.15s ease, 
                box-shadow 0.15s ease;
    cursor: pointer;
    z-index: 3;
    /* Extremely large clickable area for maximum touch sensitivity */
    padding: 60px 50px; /* More padding on top/bottom for name tooltip */
    margin: -60px -50px;
    /* Makes the planet more immediately responsive */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation; /* Better touch action handling */
}

/* Make hover effect much stronger and more immediate */
.world-planet:hover, 
.world-planet.hover {
    transform: scale(1.3) !important;
    filter: brightness(1.3) contrast(1.1);
    z-index: 10; /* Bring hovered planet to front */
}

/* Immediate visual feedback on click/touch */
.world-planet:active,
.world-planet.active {
    transform: scale(1.15) !important; /* Slight shrink when clicked */
    filter: brightness(1.5) contrast(1.2);
}

/* Click flash effect */
@keyframes clickFlash {
    0% { 
        transform: scale(0.5); 
        opacity: 0.9; 
    }
    100% { 
        transform: scale(2.5); 
        opacity: 0; 
    }
}

.planet-click-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    z-index: 20;
    animation: clickFlash 0.5s ease-out forwards;
}

.planet {
    background: linear-gradient(135deg, var(--planet-color-1), var(--planet-color-2));
    border-radius: 50%;
    box-shadow: 
        inset -8px -8px 16px rgba(0, 0, 0, 0.6),
        inset 4px 4px 12px rgba(255, 255, 255, 0.3),
        0 0 30px rgba(var(--planet-glow-color), 0.8);
    position: relative;
    overflow: hidden;
    animation: gentlePulse 4s infinite alternate ease-in-out;
    /* Add will-change for better performance */
    will-change: transform, box-shadow;
}

@keyframes gentlePulse {
    0% { box-shadow: inset -8px -8px 16px rgba(0, 0, 0, 0.6),
                     inset 4px 4px 12px rgba(255, 255, 255, 0.3),
                     0 0 30px rgba(var(--planet-glow-color), 0.7); }
    100% { box-shadow: inset -8px -8px 16px rgba(0, 0, 0, 0.6),
                       inset 4px 4px 12px rgba(255, 255, 255, 0.3),
                       0 0 40px rgba(var(--planet-glow-color), 1); }
}

/* Enhanced hover effects */
.world-planet:hover .planet,
.world-planet.hover .planet {
    animation-duration: 2s; /* Faster pulse animation on hover */
    box-shadow: 
        inset -8px -8px 16px rgba(0, 0, 0, 0.6),
        inset 4px 4px 12px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(var(--planet-glow-color), 1.3);
}

/* Enhanced active effects */
.world-planet:active .planet,
.world-planet.active .planet {
    animation: none; /* Stop animation during click */
    box-shadow: 
        inset -10px -10px 20px rgba(0, 0, 0, 0.7),
        inset 5px 5px 15px rgba(255, 255, 255, 0.4),
        0 0 80px rgba(var(--planet-glow-color), 1.5);
    transform: scale(0.95); /* Add a press effect */
}

/* Touch device specific enhancements */
@media (pointer: coarse) {
    .world-planet {
        /* Even larger touch area on touch devices */
        padding: 60px;
        margin: -60px;
    }
    
    .planet-name-tooltip {
        /* Larger text on touch devices */
        font-size: 16px;
        padding: 8px 16px;
        opacity: 1;
        bottom: -40px;
        top: auto;
    }
}

.planet-ring {
    position: absolute;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: rotateX(75deg);
}

/* Enhanced planet name tooltip */
.planet-name-tooltip {
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(6, 6, 17, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    opacity: 1; /* Always visible */
    pointer-events: none;
    white-space: nowrap;
    z-index: 100; /* Ensure it's always on top */
    border: 1px solid rgba(100, 181, 246, 0.5);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.4);
    letter-spacing: 0.5px;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
    /* Make it always visible even during animations */
    visibility: visible !important;
    display: block !important;
}

/* Enhanced tooltip hover effects */
.world-planet:hover .planet-name-tooltip,
.world-planet.hover .planet-name-tooltip {
    transform: translateX(-50%) translateY(-8px) scale(1.2);
    box-shadow: 0 0 25px rgba(100, 181, 246, 0.5);
    background-color: rgba(6, 6, 17, 0.95);
    border-color: rgba(100, 181, 246, 0.6);
    font-weight: 500;
}

/* Enhanced tooltip active effects */
.world-planet:active .planet-name-tooltip,
.world-planet.active .planet-name-tooltip {
    transform: translateX(-50%) translateY(-4px) scale(1.1);
}

/* Detailed World Tooltip - More sleek and minimal */
/* World Action Buttons in Tooltip */
.world-details-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(138, 43, 226, 0.3);
}

.world-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.world-action-btn .material-icons {
    font-size: 16px;
}

.world-action-btn.play-btn {
    background: linear-gradient(135deg, #8a2be2, #6b21a8);
    color: #fff;
    box-shadow: 0 2px 10px rgba(138, 43, 226, 0.4);
}

.world-action-btn.play-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #9b3ce3, #7c32b9);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.6);
    transform: translateY(-1px);
}

.world-action-btn.edit-btn {
    background: rgba(0, 255, 245, 0.1);
    color: #00fff5;
    border: 1px solid rgba(0, 255, 245, 0.3);
}

.world-action-btn.edit-btn:hover {
    background: rgba(0, 255, 245, 0.2);
    border-color: rgba(0, 255, 245, 0.5);
    transform: translateY(-1px);
}

.world-action-btn.disabled,
.world-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.world-action-btn.disabled:hover,
.world-action-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.world-details-tooltip {
    position: absolute;
    width: 280px;
    background-color: rgba(6, 6, 17, 0.85);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 0 30px rgba(100, 181, 246, 0.3);
    z-index: 10;
    backdrop-filter: blur(5px);
    animation: tooltipFadeIn 0.3s ease;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.world-details-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.5px;
    /* Removed neon text shadow */
}

.world-details-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
    font-weight: 300;
}

.world-details-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.world-details-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.world-details-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-primary);
    /* Removed neon text shadow */
}

.world-details-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 300;
}

/* Empty Galaxy */
.empty-galaxy {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background-color: rgba(10, 10, 24, 0.2);
}

.empty-galaxy-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.empty-galaxy-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-galaxy-subtext {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 400px;
}

/* World Creation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.cosmic-modal {
    width: 90%;
    max-width: 600px;
    background-color: var(--background-dark);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 30px var(--glow-primary);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: color var(--transition-normal);
}

.modal-close:hover {
    color: var(--text-primary);
}

.cosmic-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 16px;
    transition: all var(--transition-normal);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(100, 181, 246, 0.3);
}

.submit-btn {
    align-self: center;
    margin-top: 10px;
}

/* Travel Animation */
.travel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.travel-content {
    text-align: center;
    z-index: 2001;
}

.travel-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: white;
}

.travel-destination {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--accent-primary);
}

.wormhole {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.wormhole-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(126, 87, 194, 0.7);
    border-radius: 50%;
    animation: wormhole 3s infinite;
}

.wormhole-ring:nth-child(1) {
    width: 50px;
    height: 50px;
    animation-delay: 0s;
}

.wormhole-ring:nth-child(2) {
    width: 100px;
    height: 100px;
    animation-delay: 0.4s;
}

.wormhole-ring:nth-child(3) {
    width: 150px;
    height: 150px;
    animation-delay: 0.8s;
}

.wormhole-ring:nth-child(4) {
    width: 200px;
    height: 200px;
    animation-delay: 1.2s;
}

.wormhole-ring:nth-child(5) {
    width: 250px;
    height: 250px;
    animation-delay: 1.6s;
}

@keyframes wormhole {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* 2-second wormhole animation as requested */
.wormhole-ring {
    animation-duration: 2s !important; /* 2-second animation per user request */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cosmic-title {
        font-size: 3rem;
    }
    
    .cosmic-subtitle {
        font-size: 1.2rem;
    }
    
    .stat-orb {
        width: 90px;
        height: 90px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .galaxy-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .cosmic-title {
        font-size: 2.5rem;
    }
    
    .cosmic-stats {
        flex-wrap: wrap;
    }
    
    .stat-orb {
        width: 80px;
        height: 80px;
        margin: 5px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .galaxy-container {
        height: 350px;
    }
    
    .cosmic-modal {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
}

/* Page Transition Animation */
body.page-transition-out {
    animation: pageTransitionOut 0.6s ease-in-out forwards;
}

@keyframes pageTransitionOut {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.02);
        filter: blur(2px);
    }
    100% {
        opacity: 0;
        transform: scale(1.05);
        filter: blur(8px);
    }
}

/* Tutorial button glow animation when transitioning */
body.page-transition-out .tutorial-btn {
    animation: tutorialGlow 0.4s ease-out forwards;
}

@keyframes tutorialGlow {
    0% {
        box-shadow: 0 0 15px rgba(0, 255, 200, 0.3);
    }
    100% {
        box-shadow: 0 0 60px rgba(0, 255, 200, 0.8), 0 0 100px rgba(0, 255, 200, 0.4);
    }
}
