/* Base Styles */
:root {
    /* Color Variables */
    --bg-color: #0b0b0b;
    --bg-color-alt: #121212;
    --fire-color: #FF4C29;
    --fire-glow: #FF6B45;
    --ice-color: #00C9FF;
    --ice-glow: #33D6FF;
    --text-color: rgba(255, 255, 255, 0.87);
    --text-color-muted: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    
    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.8rem;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md) 0;
}

section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--fire-color), var(--ice-color));
}

/* Header Styles */
header {
    padding: var(--spacing-md) 0;
    position: relative;
    z-index: 100;
    background-color: rgba(11, 11, 11, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-md);
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-right: auto;
}

.logo-text {
    background: linear-gradient(90deg, var(--fire-color), var(--ice-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(255, 76, 41, 0.5), 0 0 15px rgba(0, 201, 255, 0.5);
    letter-spacing: 1px;
}

.logo-highlight {
    position: relative;
    z-index: 1;
}

nav {
    margin-left: auto;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    position: relative;
    padding: 5px 0;
    font-weight: 500;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    transition: width 0.3s ease;
}

.nav-links a.fire-glow::after {
    background-color: var(--fire-color);
    box-shadow: 0 0 5px var(--fire-color), 0 0 10px var(--fire-color);
}

.nav-links a.ice-glow::after {
    background-color: var(--ice-color);
    box-shadow: 0 0 5px var(--ice-color), 0 0 10px var(--ice-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.bar1, .bar2, .bar3 {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.4s;
}

/* Fire & Ice Text Effect */
.fire-ice-text {
    background: linear-gradient(90deg, var(--fire-color), var(--ice-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(255, 76, 41, 0.3), 0 0 20px rgba(0, 201, 255, 0.3);
    animation: textGlow 3s infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 10px rgba(255, 76, 41, 0.3), 0 0 20px rgba(0, 201, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 76, 41, 0.5), 0 0 25px rgba(0, 201, 255, 0.5);
    }
    100% {
        text-shadow: 0 0 10px rgba(255, 76, 41, 0.3), 0 0 20px rgba(0, 201, 255, 0.3);
    }
}

/* Buttons */
.cta-button, .play-button, .back-button, .submit-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--bg-color-alt);
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button::before, .play-button::before, .back-button::before, .submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--fire-color), var(--ice-color));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.cta-button:hover, .play-button:hover, .back-button:hover, .submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(255, 76, 41, 0.4), 0 0 15px rgba(0, 201, 255, 0.4);
}

.cta-button:hover::before, .play-button:hover::before, .back-button:hover::before, .submit-button:hover::before {
    opacity: 0.1;
}

/* Text Link */
.text-link {
    color: var(--ice-color);
    position: relative;
    padding-bottom: 2px;
}

.text-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--ice-color);
    box-shadow: 0 0 5px var(--ice-color);
    transition: width 0.3s ease;
}

.text-link:hover {
    color: var(--ice-glow);
}

.text-link:hover::after {
    width: 100%;
}

/* Footer Styles */
footer {
    background-color: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--spacing-md) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    position: relative;
    padding: 5px 0;
    color: var(--text-color-muted);
    transition: color 0.3s ease;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    transition: width 0.3s ease;
}

.footer-links a.fire-glow::after {
    background-color: var(--fire-color);
    box-shadow: 0 0 5px var(--fire-color);
}

.footer-links a.ice-glow::after {
    background-color: var(--ice-color);
    box-shadow: 0 0 5px var(--ice-color);
}

.footer-links a:hover {
    color: var(--text-color);
}

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

/* Game Page Styles */
.game-container {
    margin: var(--spacing-lg) auto;
    max-width: 1000px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
}

.game-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--fire-color), var(--ice-color));
    z-index: -1;
    border-radius: calc(var(--border-radius-lg) + 3px);
    animation: borderGlow 3s infinite alternate;
}

@keyframes borderGlow {
    0% {
        box-shadow: 0 0 20px rgba(255, 76, 41, 0.5), 0 0 20px rgba(0, 201, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 76, 41, 0.7), 0 0 25px rgba(0, 201, 255, 0.7);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 76, 41, 0.5), 0 0 20px rgba(0, 201, 255, 0.5);
    }
}

.game-iframe {
    width: 100%;
    height: 700px;
    border: none;
    background-color: #000;
}

.back-container {
    text-align: center;
    margin: var(--spacing-lg) 0;
}

/* Legal Pages */
.legal-content {
    background-color: rgba(18, 18, 18, 0.7);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    border: 1px solid var(--border-color);
}

.legal-content h2 {
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
}

.legal-content p, .legal-content li {
    margin-bottom: var(--spacing-sm);
    color: var(--text-color-muted);
    line-height: 1.7;
}

/* Contact Page */
.contact-form {
    max-width: 600px;
    margin: var(--spacing-xl) auto;
    padding: var(--spacing-lg);
    background-color: rgba(18, 18, 18, 0.7);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--ice-color);
    box-shadow: 0 0 8px rgba(0, 201, 255, 0.3);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-container {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-color-alt);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 1px solid var(--border-color);
    text-align: center;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-title {
    margin-bottom: var(--spacing-sm);
    color: var(--ice-color);
}

.modal-close {
    display: inline-block;
    padding: 8px 20px;
    margin-top: var(--spacing-md);
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: var(--fire-color);
    color: white;
}

/* Responsive Styles */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        flex-direction: column;
        background-color: var(--bg-color-alt);
        padding-top: 80px;
        transition: right 0.3s ease;
        z-index: 90;
        text-align: center;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: var(--spacing-md) 0;
    }

    .mobile-menu-btn {
        display: flex;
        position: relative;
        z-index: 100;
    }

    .mobile-menu-btn.active .bar1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .mobile-menu-btn.active .bar2 {
        opacity: 0;
    }

    .mobile-menu-btn.active .bar3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        margin-top: var(--spacing-sm);
    }

    .game-iframe {
        height: 500px;
    }
}

@media (max-width: 576px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }

    .game-iframe {
        height: 400px;
    }
}