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

body {
    font-family: 'Orbitron', 'Arial', sans-serif;
    background: linear-gradient(135deg, #0c0c1e 0%, #1a1a3e 50%, #2d1b69 100%);
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    background: transparent;
}

.stars::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 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: sparkle 3s linear infinite;
}

.nebula {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 20% 80%, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(255, 20, 147, 0.1) 0%, transparent 50%);
    animation: nebula-drift 20s ease-in-out infinite alternate;
}

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

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

/* Navigation */
.cosmic-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(12, 12, 30, 0.8);
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.cosmic-glow {
    background: linear-gradient(45deg, #8a2be2, #4169e1, #ff1493);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cosmic-gradient 3s ease infinite;
}

@keyframes cosmic-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.nav-link {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.4), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(138, 43, 226, 0.2);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.wormhole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 30%, rgba(138, 43, 226, 0.2) 40%, rgba(65, 105, 225, 0.3) 60%, rgba(255, 20, 147, 0.2) 80%, transparent 100%);
    animation: wormhole-spin 10s linear infinite, wormhole-pulse 3s ease-in-out infinite alternate;
}

@keyframes wormhole-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes wormhole-pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.2); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.flicker {
    animation: flicker 2s linear infinite;
}

@keyframes flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 5px #ffffff,
            0 0 10px #ffffff,
            0 0 15px #8a2be2,
            0 0 20px #8a2be2,
            0 0 35px #8a2be2,
            0 0 40px #8a2be2;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cosmic-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #8a2be2, #4169e1);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cosmic-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

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

.cosmic-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.5);
}

/* Games Section */
.games-section {
    padding: 6rem 0;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 3rem;
}

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

.game-card {
    background: linear-gradient(135deg, rgba(26, 26, 62, 0.8), rgba(45, 27, 105, 0.6));
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #8a2be2, #4169e1, #ff1493, #8a2be2);
    background-size: 400% 400%;
    animation: gradient-border 4s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

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

.game-card:hover {
    transform: translateY(-10px) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(138, 43, 226, 0.3);
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.floating:nth-child(even) {
    animation-delay: -3s;
}

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

@keyframes gradient-border {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.game-card p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
    line-height: 1.6;
}

.engage-btn {
    background: linear-gradient(45deg, #ff1493, #8a2be2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.engage-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.engage-btn:hover::before {
    left: 100%;
}

.engage-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 20, 147, 0.5);
}

/* Game Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.game-frame {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    background: linear-gradient(135deg, #1a1a3e, #2d1b69);
    border-radius: 20px;
    border: 2px solid #8a2be2;
    box-shadow: 0 0 50px rgba(138, 43, 226, 0.5);
    display: flex;
    flex-direction: column;
}

.game-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(12, 12, 30, 0.8);
    border-radius: 18px 18px 0 0;
}

.close-game {
    background: #ff1493;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.close-game:hover {
    background: #ff4500;
    transform: scale(1.1);
}

.cosmic-frame {
    flex: 1;
    padding: 1rem;
    position: relative;
}

.cosmic-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid #4169e1;
    border-radius: 10px;
    animation: cosmic-pulse 2s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes cosmic-pulse {
    0% { box-shadow: 0 0 10px rgba(65, 105, 225, 0.5); }
    100% { box-shadow: 0 0 30px rgba(65, 105, 225, 0.8); }
}

#game-iframe {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Disclaimer Section */
.disclaimer-section {
    padding: 3rem 0;
    background: rgba(12, 12, 30, 0.8);
    border-top: 2px solid rgba(138, 43, 226, 0.3);
    border-bottom: 2px solid rgba(138, 43, 226, 0.3);
}

.disclaimer-title {
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.6;
    color: #ffff00;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

/* Footer */
.cosmic-footer {
    background: linear-gradient(135deg, #0c0c1e, #1a1a3e);
    padding: 3rem 0 1rem;
    position: relative;
    overflow: hidden;
}

.orbiting-planets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.orbiting-planets::before,
.orbiting-planets::after {
    content: '🪐';
    position: absolute;
    font-size: 2rem;
    animation: orbit 20s linear infinite;
}

.orbiting-planets::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.orbiting-planets::after {
    content: '🌟';
    top: 60%;
    right: 10%;
    animation-delay: -10s;
}

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #8a2be2;
    font-size: 1.1rem;
}

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

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

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #8a2be2, #4169e1);
    transition: width 0.3s ease;
}

.footer-section a:hover::after {
    width: 100%;
}

.footer-section a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(138, 43, 226, 0.3);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .game-frame {
        top: 2%;
        left: 2%;
        right: 2%;
        bottom: 2%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .disclaimer-title {
        font-size: 1rem;
    }
}

/* Additional Page Styles */
.page-header {
    padding: 8rem 0 4rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(65, 105, 225, 0.1));
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
}

.content-section {
    padding: 4rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.content-text {
    line-height: 1.8;
    font-size: 1.1rem;
}

.content-text p {
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(138, 43, 226, 0.1);
    border-radius: 10px;
    border-left: 4px solid #8a2be2;
    animation: slide-in 0.6s ease forwards;
    opacity: 0;
    transform: translateX(-30px);
}

.feature-list li:nth-child(1) { animation-delay: 0.1s; }
.feature-list li:nth-child(2) { animation-delay: 0.2s; }
.feature-list li:nth-child(3) { animation-delay: 0.3s; }
.feature-list li:nth-child(4) { animation-delay: 0.4s; }
.feature-list li:nth-child(5) { animation-delay: 0.5s; }

@keyframes slide-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #8a2be2, #4169e1, #ff1493);
}

.timeline-item {
    position: relative;
    padding: 2rem 0 2rem 5rem;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 2.5rem;
    width: 1rem;
    height: 1rem;
    background: #8a2be2;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.8);
}

.contact-form {
    background: rgba(26, 26, 62, 0.8);
    padding: 3rem;
    border-radius: 20px;
    border: 2px solid rgba(138, 43, 226, 0.3);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #8a2be2;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(12, 12, 30, 0.8);
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}

.submit-btn {
    background: linear-gradient(45deg, #8a2be2, #4169e1);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.5);
}

.legal-content {
    line-height: 1.8;
    font-size: 1rem;
}

.legal-content h3 {
    color: #8a2be2;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content p {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-item {
        padding-left: 3rem;
    }
    
    .timeline-item::before {
        left: 0.5rem;
    }
}