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

body {
    font-family: 'Raleway', sans-serif;
    background: #0a0a0a;
    color: #e5e7eb;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Cosmic Background */
.cosmic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(ellipse at center, #1a0b3d 0%, #0f0220 50%, #000000 100%);
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    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 150px;
    animation: twinkle 20s linear infinite;
}

.nebula {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(75, 0, 130, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(65, 105, 225, 0.1) 0%, transparent 50%);
    animation: nebulaDrift 30s ease-in-out infinite alternate;
}

.floating-crystals {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(4px 4px at 10% 20%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(3px 3px at 70% 60%, rgba(138, 43, 226, 0.4), transparent),
        radial-gradient(5px 5px at 30% 80%, rgba(75, 0, 130, 0.3), transparent);
    background-size: 300px 300px;
    animation: crystalFloat 25s ease-in-out infinite;
}

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

@keyframes nebulaDrift {
    0% { transform: translateX(-10px) translateY(-5px); }
    100% { transform: translateX(10px) translateY(5px); }
}

@keyframes crystalFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(-10px) rotate(240deg); }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    backdrop-filter: blur(20px);
    background: rgba(26, 11, 61, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.constellation-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Cinzel', serif;
}

.constellation-logo .star {
    color: #e5e7eb;
    font-size: 1.2em;
    animation: starGlow 2s ease-in-out infinite alternate;
}

.constellation-logo .brand-text {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(45deg, #e5e7eb, #8b5cf6, #06b6d4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.constellation-logo.small .brand-text {
    font-size: 1.4rem;
}

@keyframes starGlow {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.2); }
}

.menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #e5e7eb;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-orb {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #8b5cf6, #06b6d4);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #8b5cf6;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.7);
}

.nav-link:hover .nav-orb {
    transform: scale(1.5);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.8);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding-top: 80px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.ethereal-guardian {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.3), transparent);
    border-radius: 50%;
    animation: guardianGlow 4s ease-in-out infinite alternate;
}

@keyframes guardianGlow {
    0% { opacity: 0.3; transform: translateX(-50%) scale(1); }
    100% { opacity: 0.7; transform: translateX(-50%) scale(1.2); }
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.title-line {
    display: block;
    margin: 0.5rem 0;
}

.title-line.glow {
    background: linear-gradient(45deg, #8b5cf6, #06b6d4, #f0abfc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: #d1d5db;
}

.stardust-trail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 30% 40%, rgba(139, 92, 246, 0.6), transparent),
        radial-gradient(1px 1px at 60% 70%, rgba(6, 182, 212, 0.6), transparent),
        radial-gradient(1px 1px at 80% 30%, rgba(255, 255, 255, 0.4), transparent);
    background-size: 400px 400px;
    animation: stardustMove 40s linear infinite;
}

@keyframes stardustMove {
    0% { transform: translateY(100vh) rotate(0deg); }
    100% { transform: translateY(-100vh) rotate(360deg); }
}

/* Cosmic Button */
.cosmic-button {
    position: relative;
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    background: linear-gradient(45deg, #4c1d95, #6366f1, #8b5cf6);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cosmic-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cosmic-button:hover .button-glow {
    left: 100%;
}

/* Section Styles */
section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, #e5e7eb, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #d1d5db;
    opacity: 0.8;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.feature-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 50%;
    background: linear-gradient(45deg, #4c1d95, #8b5cf6);
    color: white;
}

.icon-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(45deg, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.feature-card:hover .icon-glow {
    opacity: 0.7;
}

.feature-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #f3f4f6;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.celestial-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.about-image:hover .celestial-image {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.about-image:hover .image-overlay {
    opacity: 1;
}

.about-text {
    padding-left: 2rem;
}

.about-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #8b5cf6;
}

.about-description {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #d1d5db;
}

.cosmic-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #8b5cf6;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #9ca3af;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Games Section */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
}

.game-portal {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.game-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image {
    transform: scale(1.1);
}

.portal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .portal-overlay {
    opacity: 1;
}

.game-title {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.game-card:hover .game-title {
    opacity: 1;
    transform: translateY(0);
}

.play-button {
    position: relative;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #4c1d95, #8b5cf6);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.star-cluster {
    margin-right: 0.5rem;
    animation: starClusterGlow 2s ease-in-out infinite alternate;
}

@keyframes starClusterGlow {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    background: linear-gradient(45deg, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.form-group input:focus + .input-glow,
.form-group textarea:focus + .input-glow {
    opacity: 0.2;
}

.contact-info {
    padding: 2rem;
    text-align: center;
}

.cosmic-ornament {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #8b5cf6;
}

.contact-details {
    margin-top: 2rem;
}

.detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.detail-icon {
    color: #8b5cf6;
}

/* Disclaimer Section */
.disclaimer-section {
    padding: 3rem 0;
    background: rgba(139, 92, 246, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cosmic-disclaimer {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cosmic-disclaimer h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #8b5cf6;
}

.cosmic-disclaimer p {
    color: #d1d5db;
    line-height: 1.8;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.5);
    padding: 3rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-brand {
    flex: 1;
}

.copyright {
    margin-top: 1rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

.footer-links h4 {
    font-family: 'Cinzel', serif;
    color: #8b5cf6;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #8b5cf6;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Game Page Styles */
.game-page {
    min-height: 100vh;
    padding-top: 50px;
    display: flex;
    flex-direction: column;
}

.game-header {
    text-align: center;
    padding: 2rem 0;
}


.game-container {
    flex: 1;
    padding: 2rem;
}

.game-frame {
    width: 100%;
    height: 500px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    margin-bottom: 2rem;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #374151, #6b7280);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 114, 128, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-text {
        padding-left: 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cosmic-stats {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .constellation-logo .brand-text {
        font-size: 1.4rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cosmic-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: #ffffff;
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

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

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #7c3aed, #0891b2);
}