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

:root {
    --primary-color: #1cb5e0;
    --secondary-color: #000046;
    --accent-color: #f4f4f4;
    --dark-color: #121212;
    --gradient-cosmic: linear-gradient(135deg, #000046 0%, #1cb5e0 50%, #000046 100%);
    --gradient-nebula: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    --text-light: #f4f4f4;
    --text-dark: #333;
    --transition: all 0.3s ease;
    --shadow-glow: 0 0 20px rgba(28, 181, 224, 0.3);
    --shadow-deep: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--dark-color);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(28, 181, 224, 0.2);
    z-index: 1000;
    transition: var(--transition);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
}

.nav-logo:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(28, 181, 224, 0.5);
}

.logo-icon {
    font-size: 2rem;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-cosmic);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: var(--transition);
}

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

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-cosmic);
    z-index: -2;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, white, transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: twinkle 4s ease-in-out infinite alternate;
}

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

.nebula {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(118, 75, 162, 0.3) 0%, transparent 50%);
    animation: drift 20s ease-in-out infinite alternate;
}

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

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

.hero-title {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    0% { text-shadow: 0 0 20px rgba(28, 181, 224, 0.5); }
    100% { text-shadow: 0 0 30px rgba(28, 181, 224, 0.8); }
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-cosmic);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(28, 181, 224, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* About Section */
.about {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--dark-color) 0%, #1a1a2e 100%);
}

.about h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.about p {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Games Section */
.games {
    padding: 5rem 0;
    background: var(--dark-color);
}

.games h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.games-intro {
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.game-card {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(28, 181, 224, 0.2);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(28, 181, 224, 0.3);
    border-color: var(--primary-color);
}

.game-image {
    position: relative;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

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

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 70, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.play-btn {
    padding: 1rem 2rem;
    background: var(--gradient-cosmic);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(28, 181, 224, 0.5);
}

.game-info {
    padding: 1.5rem;
}

.game-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.game-info p {
    opacity: 0.8;
    margin: 0;
    font-size: 0.95rem;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1a1a2e 0%, var(--dark-color) 100%);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(145deg, #16213e, #1a1a2e);
    border-radius: 20px;
    border: 1px solid rgba(28, 181, 224, 0.2);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(28, 181, 224, 0.2);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card p {
    opacity: 0.8;
    margin: 0;
}

/* Disclaimer Section */
.disclaimer {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

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

.disclaimer h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.disclaimer-text {
    background: linear-gradient(145deg, #16213e, #1a1a2e);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(28, 181, 224, 0.2);
    text-align: left;
}

.disclaimer-text p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.disclaimer-text p:last-child {
    margin-bottom: 0;
}

.disclaimer-text strong {
    color: var(--primary-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: 2% auto;
    width: 95%;
    max-width: 1200px;
    height: 90%;
    background: var(--dark-color);
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 20px 60px rgba(28, 181, 224, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(28, 181, 224, 0.3);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 18px 18px 0 0;
}

.modal-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.close {
    color: var(--text-light);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    padding: 0 0.5rem;
}

.close:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.modal-body {
    height: calc(100% - 80px);
    padding: 0;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 18px 18px;
}

/* Contact Page Styles */
.contact-page,
.privacy-page,
.terms-page {
    padding: 8rem 0 4rem;
    min-height: 100vh;
}

.contact-header,
.privacy-header,
.terms-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h1,
.privacy-header h1,
.terms-header h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.last-updated {
    color: var(--primary-color);
    font-style: italic;
    margin-bottom: 1rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-form-container h2,
.contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-form {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(28, 181, 224, 0.2);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(28, 181, 224, 0.3);
    border-radius: 10px;
    background: rgba(18, 18, 18, 0.8);
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition);
}

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

.contact-info {
    background: linear-gradient(145deg, #16213e, #1a1a2e);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(28, 181, 224, 0.2);
    height: fit-content;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(18, 18, 18, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(28, 181, 224, 0.1);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(28, 181, 224, 0.2);
}

.contact-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.contact-item h4 {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.contact-item p {
    margin: 0;
    font-weight: 500;
}

.contact-item small {
    color: rgba(244, 244, 244, 0.7);
}

/* Privacy and Terms Content */
.privacy-content,
.terms-content {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-section,
.terms-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 15px;
    border: 1px solid rgba(28, 181, 224, 0.2);
}

.privacy-section h2,
.terms-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.privacy-section h3,
.terms-section h3 {
    color: var(--text-light);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
}

.privacy-section ul,
.terms-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.privacy-section li,
.terms-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.contact-info {
    background: rgba(26, 26, 46, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(28, 181, 224, 0.3);
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #000046, #1a1a2e);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(28, 181, 224, 0.3);
}

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

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section p {
    opacity: 0.8;
    margin-bottom: 1rem;
}

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

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

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.8;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(28, 181, 224, 0.2);
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(18, 18, 18, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        backdrop-filter: blur(10px);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .modal-content {
        margin: 5% auto;
        width: 95%;
        height: 85%;
    }

    .modal-header {
        padding: 1rem;
    }
}

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

    .hero-subtitle {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .game-info {
        padding: 1rem;
    }

    .feature-card,
    .contact-form,
    .contact-info,
    .privacy-section,
    .terms-section {
        padding: 1.5rem;
    }

    .disclaimer-text {
        padding: 1.5rem;
    }
}

/* Loading and Performance */
img {
    loading: lazy;
}

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

/* Selection styles */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}