/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF00;
    --secondary-color: #FF6B00;
    --accent-color: #FF4500;
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --text-light: #FFFFFF;
    --text-gray: #CCCCCC;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --glow-yellow: rgba(255, 255, 0, 0.5);
    --glow-orange: rgba(255, 107, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-darker);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 2vw, 2rem);
    width: 100%;
}

/* Logo Header */
.logo-header {
    text-align: center;
    background: var(--bg-darker);
    width: 100%;
}

.header-logo {
    height: auto;
    width: auto;
    max-width: min(90%, 400px);
    filter: drop-shadow(0 0 15px var(--glow-yellow));
    object-fit: contain;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 4rem 0;
    z-index: 1;
    margin-top: 0;
    overflow: visible;
    max-width: 100%;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-darker) 0%, #1a0a0a 50%, var(--bg-darker) 100%);
    z-index: -2;
    pointer-events: none;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/bg_turned.png');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -1;
}

.hero-content {
    text-align: center;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.hero-logo {
    margin-bottom: 2rem;
}

.main-logo {
    height: 200px;
    width: auto;
    max-width: 90%;
    filter: drop-shadow(0 0 30px var(--glow-yellow));
    animation: pulse 2s ease-in-out infinite;
}

.hero-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
    gap: clamp(0.5rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
    justify-items: center;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.screenshot-item {
    width: 100%;
    max-width: 200px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 9 / 16;
    background: rgba(0, 0, 0, 0.25);
}

.screenshot-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 255, 0, 0.3);
}

.screenshot-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px var(--glow-yellow));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 50px var(--glow-orange));
    }
}

.hero-title {
    display: none; /* Hidden since logo already contains "TURNED!" text */
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px var(--glow-yellow));
    }
    to {
        filter: drop-shadow(0 0 40px var(--glow-orange));
    }
}

.hero-subtitle {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    color: #FF00FF;
    margin-bottom: 1rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 
        -1px -1px 0px #000000,
        1px -1px 0px #000000,
        -1px 1px 0px #000000,
        1px 1px 0px #000000,
        0 0 10px #FF00FF,
        0 0 20px #FF00FF,
        0 0 30px #FF00FF,
        0 0 40px #FF00FF,
        0 0 50px #00FFFF,
        0 0 60px #00FFFF;
    animation: subtitle-glow 2s ease-in-out infinite alternate;
    letter-spacing: 0.05em;
    padding: 0 clamp(0.5rem, 2vw, 1rem);
}

@keyframes subtitle-glow {
    0% {
        text-shadow: 
            -1px -1px 0px #000000,
            1px -1px 0px #000000,
            -1px 1px 0px #000000,
            1px 1px 0px #000000,
            0 0 10px #FF00FF,
            0 0 20px #FF00FF,
            0 0 30px #FF00FF,
            0 0 40px #FF00FF,
            0 0 50px #00FFFF,
            0 0 60px #00FFFF;
    }
    100% {
        text-shadow: 
            -1px -1px 0px #000000,
            1px -1px 0px #000000,
            -1px 1px 0px #000000,
            1px 1px 0px #000000,
            0 0 15px #FF00FF,
            0 0 25px #FF00FF,
            0 0 35px #FF00FF,
            0 0 45px #FF00FF,
            0 0 55px #00FFFF,
            0 0 65px #00FFFF,
            0 0 75px #00FFFF;
    }
}

.hero-description {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: var(--text-gray);
    max-width: min(90%, 600px);
    margin: 0 auto clamp(1.5rem, 4vh, 2rem);
    line-height: 1.8;
    padding: 0 clamp(0.5rem, 2vw, 1rem);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-darker);
    box-shadow: 0 5px 20px rgba(255, 255, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 0, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-darker);
    transform: translateY(-3px);
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
}

.hero-tiles {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.tile-preview {
    width: 80px;
    height: 80px;
    animation: float 3s ease-in-out infinite;
}

.tile-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 15px var(--glow-yellow));
}

.tile-1 {
    animation-delay: 0s;
}

.tile-2 {
    animation-delay: 0.5s;
}

.tile-3 {
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Section Styles */
section {
    position: relative;
    padding: 4rem 0;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.arcade-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    letter-spacing: 0.1em;
    color: #00FFFF;
    text-shadow: 
        -2px -2px 0px #000000,
        2px -2px 0px #000000,
        -2px 2px 0px #000000,
        2px 2px 0px #000000,
        -3px -3px 0px #000000,
        3px -3px 0px #000000,
        -3px 3px 0px #000000,
        3px 3px 0px #000000,
        0 0 10px #00FFFF,
        0 0 20px #00FFFF,
        0 0 30px #00FFFF,
        0 0 40px #00FFFF,
        0 0 50px #00FFFF;
    animation: arcade-glow 2s ease-in-out infinite alternate;
    text-transform: uppercase;
    line-height: 1.6;
    margin-bottom: 3rem;
    position: relative;
    -webkit-text-stroke: 2px #000000;
}

.arcade-title::before {
    content: '▶';
    color: #00FFFF;
    margin-right: 1rem;
    text-shadow: 0 0 10px #00FFFF;
    animation: blink 1s step-end infinite;
}

.arcade-title::after {
    content: '◀';
    color: #00FFFF;
    margin-left: 1rem;
    text-shadow: 0 0 10px #00FFFF;
    animation: blink 1s step-end infinite;
}

@keyframes arcade-glow {
    0% {
        text-shadow: 
            -2px -2px 0px #000000,
            2px -2px 0px #000000,
            -2px 2px 0px #000000,
            2px 2px 0px #000000,
            -3px -3px 0px #000000,
            3px -3px 0px #000000,
            -3px 3px 0px #000000,
            3px 3px 0px #000000,
            0 0 10px #00FFFF,
            0 0 20px #00FFFF,
            0 0 30px #00FFFF,
            0 0 40px #00FFFF,
            0 0 50px #00FFFF;
    }
    100% {
        text-shadow: 
            -2px -2px 0px #000000,
            2px -2px 0px #000000,
            -2px 2px 0px #000000,
            2px 2px 0px #000000,
            -3px -3px 0px #000000,
            3px -3px 0px #000000,
            -3px 3px 0px #000000,
            3px 3px 0px #000000,
            0 0 20px #00FFFF,
            0 0 30px #00FFFF,
            0 0 40px #00FFFF,
            0 0 50px #00FFFF,
            0 0 60px #00FFFF,
            0 0 70px #00FFFF;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* How to Play Section */
.how-to-play {
    background: rgba(10, 10, 10, 0.8);
    padding: 4rem 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: clamp(15px, 2vw, 20px);
    padding: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 0, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.step-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(255, 255, 0, 0.2);
}

.step-card:hover::before {
    opacity: 1;
}

.step-number {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--bg-darker);
    box-shadow: 0 5px 15px rgba(255, 255, 0, 0.3);
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-icon-img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
}

.step-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.step-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Rules Section */
.rules {
    background: var(--bg-darker);
}

.rules-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.rules-visual {
    position: sticky;
    top: 100px;
}

.board-demo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 20px;
    border: 2px solid var(--card-border);
}

.demo-tile {
    aspect-ratio: 1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.demo-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tile-normal {
    background: rgba(255, 255, 255, 0.1);
}

.tile-selected {
    background: rgba(255, 255, 0, 0.3);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px var(--glow-yellow);
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 0 20px var(--glow-yellow);
    }
    50% {
        box-shadow: 0 0 40px var(--glow-orange);
    }
}

.tile-empty {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.rules-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.rule-item {
    display: flex;
    gap: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.rule-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(255, 255, 0, 0.1);
    transform: translateX(10px);
}

.rule-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.rule-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.rule-content p {
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.rule-content ul {
    margin-left: 1.5rem;
    color: var(--text-gray);
}

.rule-content li {
    margin-bottom: 0.5rem;
}

.rule-content strong {
    color: var(--primary-color);
}

/* Themes Section */
.themes {
    background: var(--bg-darker);
    padding: 4rem 0;
}

.themes-intro {
    text-align: center;
    color: var(--text-gray);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(1.5rem, 4vw, 2.5rem);
    width: 100%;
}

.theme-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: clamp(15px, 2vw, 20px);
    padding: 0;
    text-align: center;
    transition: all 0.3s;
    width: 100%;
    overflow: hidden;
}

.theme-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(255, 255, 0, 0.2);
}

.theme-image {
    width: 100%;
    height: 0;
    padding-bottom: 75%;
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.theme-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.theme-card:hover .theme-img {
    transform: scale(1.05);
}

.theme-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin: 1.5rem 1rem 0.5rem;
    color: var(--primary-color);
}

.theme-card p {
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0 1rem 1.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Features Section */
.features {
    background: rgba(10, 10, 10, 0.8);
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: clamp(15px, 2vw, 20px);
    padding: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    transition: all 0.3s;
    width: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(255, 255, 0, 0.2);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--bg-darker), #1a0a0a);
    text-align: center;
    padding: 4rem 0;
}

.cta-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.play-badge-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.play-badge {
    height: clamp(44px, 8vw, 72px);
    width: auto;
    max-width: 100%;
    display: block;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.play-badge-link:hover .play-badge {
    transform: translateY(-2px);
    filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.75));
}

/* Footer */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--card-border);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 8px var(--glow-yellow));
}

.footer-text {
    color: var(--text-gray);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
/* Mobile First - Base styles for mobile */
/* Additional optimizations for very small phones */
@media (max-width: 360px) {
    .hero-screenshots {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .screenshot-item {
        max-width: 100%;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .themes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .arcade-title {
        font-size: 0.9rem;
        line-height: 2;
    }

    .arcade-title::before,
    .arcade-title::after {
        font-size: 0.8rem;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 768px) {
    .hero-screenshots {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .arcade-title {
        font-size: 1.1rem;
    }
}

/* Desktop and larger */
@media (min-width: 769px) {
    .hero-screenshots {
        grid-template-columns: repeat(4, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .themes-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Large Desktop */
@media (min-width: 1024px) {
    .steps-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .themes-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .rules-content {
        grid-template-columns: 1fr;
    }

    .rules-visual {
        position: static;
    }

    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

