/* Base Styles */
:root {
    --primary-color: #e43222;
    --secondary-color: #00a758;
    --tertiary-color: #ffc619;
    --luigi-green: #26b44c;
    --mario-red: #ff0000;
    --dark-bg: #222639;
    --light-bg: #f5f5f5;
    --text-dark: #333;
    --text-light: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 10px 20px rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --glow: 0 0 10px rgba(38, 180, 76, 0.7);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Press Start 2P', cursive;
    line-height: 1.3;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

h1 {
    font-size: 2.5rem;
    color: var(--text-light);
}

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

h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--tertiary-color);
}

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

section {
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.btn-primary {
    background-color: var(--luigi-green);
    color: var(--text-light);
    border: none;
}

.btn-primary:hover {
    background-color: #1e9e3e;
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

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

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 40px;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--luigi-green);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: var(--luigi-green);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: pulse 2s infinite;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-light);
    font-weight: bold;
    position: relative;
    padding: 5px 0;
}

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

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

.nav-links a:hover {
    color: var(--luigi-green);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-light);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/luigi_hero_img.webp');
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    padding: 20rem 0 15rem;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(38, 180, 76, 0.2), rgba(255, 198, 25, 0.2));
    z-index: 1;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.hero-image img {
    width: 100%;
    max-width: 400px;
    margin-top: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Floating elements in hero */
.floating-mushroom {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('images/mushroom.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1;
    opacity: 0.7;
}

.floating-star {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('/assets/backgrounds/star_image.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1;
    opacity: 0.7;
    animation: rotate 10s linear infinite, float 8s ease-in-out infinite;
}

.mushroom-1 {
    top: 15%;
    left: 10%;
    animation: float 7s ease-in-out infinite;
}

.mushroom-2 {
    bottom: 20%;
    right: 15%;
    animation: float 9s ease-in-out infinite 1s;
}

.star-1 {
    top: 30%;
    right: 20%;
}

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

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* About Section */
.about {
    background-color: white;
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background-image: url('images/question_block.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 0;
}

.video-container {
    margin-top: 2rem;
    text-align: center;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-strong);
}

.video-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--luigi-green);
    border-radius: calc(var(--border-radius) + 5px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; 
}

.video-container:hover::before {
    opacity: 1;
}

/* Features Section */
.features {
    background-color: var(--light-bg);
    position: relative;
}

.features::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-image: url('images/grass.png');
    background-repeat: repeat-x;
    background-position: bottom center;
    background-size: contain;
    opacity: 0.1;
    z-index: 0;
}

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

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-strong);
    border-color: var(--luigi-green);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2);
}

/* Screenshots Section */
.screenshots {
    background-color: white;
    position: relative;
}

.screenshots::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 50px;
    width: 150px;
    height: 150px;
    background-image: url('images/pipe.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 0;
}

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

.screenshot {
    text-align: center;
    position: relative;
    transition: all 0.4s ease;
}

.screenshot img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    border: 3px solid transparent;
}

.screenshot:hover img {
    transform: scale(1.05);
    box-shadow: var(--shadow-strong);
    border-color: var(--luigi-green);
}

.screenshot p {
    font-weight: bold;
    margin-top: 1rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* Gameplay Section */
.gameplay {
    background-color: var(--light-bg);
    position: relative;
}

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

.gameplay-text {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.gameplay-text h3 {
    color: var(--luigi-green);
    margin-bottom: 1.5rem;
}

.gameplay-text ol {
    margin-left: 1.5rem;
}

.gameplay-text li {
    margin-bottom: 1rem;
}

.hand-rankings {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.hand-rankings h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.rankings-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.ranking-item {
    padding: 0.8rem;
    border-radius: var(--border-radius);
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    border-left: 4px solid var(--tertiary-color);
}

.ranking-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow);
    background-color: #f5f5f5;
}

.ranking-title {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.ranking-description {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.ranking-example {
    font-size: 0.8rem;
    font-style: italic;
    color: #666;
}

/* Card Hierarchy Section */
.card-hierarchy {
    background-color: white;
    position: relative;
}

.card-lineup {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.card-character {
    text-align: center;
    transition: all 0.3s ease;
}

.card-character:hover {
    transform: translateY(-10px) scale(1.05);
}

.card-image {
    width: 120px;
    height: 180px;
    background-color: #f0f0f0;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 3px solid var(--secondary-color);
}

.card-character:hover .card-image {
    box-shadow: var(--shadow-strong), 0 0 15px var(--tertiary-color);
}

.star-card {
    background-image: url('../assets/backgrounds/Star.png');
    background-size: cover;
    background-position: center;
    border-color: gold;
}

.mario-card {
    background-image: url('../assets/backgrounds/Mario.png');
    background-size: cover;
    background-position: center;
    border-color: var(--mario-red);
}

.luigi-card {
    background-image: url('../assets/backgrounds/Luigi.png');
    background-size: cover;
    background-position: center;
    border-color: var(--luigi-green);
}

.flower-card {
    background-image: url('../assets/backgrounds/Flower.png');
    background-size: cover;
    background-position: center;
    border-color: orange;
}

.mushroom-card {
    background-image: url('../assets/backgrounds/Mushroom.png');
    background-size: cover;
    background-position: center;
    border-color: red;
}

.cloud-card {
    background-image: url('../assets/backgrounds/Cloud.png');
    background-size: cover;
    background-position: center;
    border-color: lightblue;
}

.card-character p {
    font-weight: bold;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--text-dark);
}

.card-value {
    display: block;
    font-size: 0.7rem;
    color: #666;
    font-style: italic;
}

/* Download Section */
.download {
    background-color: var(--light-bg);
    position: relative;
}

.download::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/pixel_pattern.png');
    background-size: 100px;
    opacity: 0.05;
    z-index: 0;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.download-card {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.download-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.download-card h3 {
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
}

.download-card h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    bottom: 0;
    left: 0;
}

.download-card ul, .download-card ol {
    margin-left: 1.5rem;
}

.download-card li {
    margin-bottom: 0.8rem;
    position: relative;
}

.download-card ul li::before {
    content: '★';
    color: var(--tertiary-color);
    position: absolute;
    left: -1.2rem;
}

.download-card code {
    background-color: #f0f0f0;
    padding: 3px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: var(--primary-color);
}

.download-buttons {
    text-align: center;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

/* Rules Section */
.rules {
    background-color: white;
    position: relative;
}

.rules::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background-image: url('/assets/backgrounds/Coin.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 0;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.rules-card {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-top: 4px solid var(--tertiary-color);
}

.rules-card:nth-child(2) {
    border-top-color: var(--primary-color);
}

.rules-card:nth-child(3) {
    border-top-color: var(--secondary-color);
}

.rules-card:nth-child(4) {
    border-top-color: var(--luigi-green);
}

.rules-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.rules-card h3 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
}

/* Developer Section */
.developer {
    background-color: var(--light-bg);
    position: relative;
}

.developer:nth-child(odd) {
    background-color: white;
}

.dev-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.dev-info:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.dev-photo {
    flex: 1;
    min-width: 250px;
}

.dev-photo img {
    transition: all 0.4s ease;
    box-shadow: var(--shadow);
    border: 3px solid var(--secondary-color);
}

.dev-info:hover .dev-photo img {
    transform: scale(1.05);
    box-shadow: var(--shadow-strong);
}

.photo-placeholder {
    width: 100%;
    max-width: 300px;
    height: 300px;
    background-color: #ddd;
    border-radius: 50%;
    margin: 0 auto;
}

.dev-bio {
    flex: 2;
    min-width: 300px;
}

.dev-bio h3 {
    color: var(--primary-color);
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-icon {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--secondary-color);
    color: var(--text-light);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--tertiary-color), var(--luigi-green));
}

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

.footer-copyright {
    opacity: 0.7;
}

.footer-attribution h4, .footer-links h4 {
    color: var(--tertiary-color);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 8px;
}

.footer-attribution h4::after, .footer-links h4::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background: var(--tertiary-color);
    bottom: 0;
    left: 0;
}

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

.footer-attribution li, .footer-links li {
    margin-bottom: 0.8rem;
    transition: all 0.2s ease;
}

.footer-links a {
    color: var(--text-light);
    transition: all 0.3s ease;
    position: relative;
    padding-left: 15px;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--luigi-green);
    padding-left: 20px;
}

.footer-links a:hover::before {
    left: 5px;
    color: var(--luigi-green);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hamburger {
        display: flex;
        z-index: 1001;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: all 0.5s ease;
        z-index: 1000;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -8px);
    }
    
    .hero {
        padding-top: 10rem;
        padding-bottom: 8rem;
    }
    
    .gameplay-content {
        grid-template-columns: 1fr;
    }
    
    .card-lineup {
        justify-content: center;
    }
    
    .card-image {
        width: 100px;
        height: 150px;
    }
    
    .dev-info {
        flex-direction: column;
        text-align: center;
    }
    
    .dev-photo {
        margin-bottom: 1.5rem;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        text-shadow: 0 0 5px rgba(38, 180, 76, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(38, 180, 76, 0.7);
    }
    100% {
        text-shadow: 0 0 5px rgba(38, 180, 76, 0.3);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Easter Egg Animation */
.luigi-sprite {
    position: fixed;
    bottom: 10px;
    left: -100px;
    width: 80px;
    height: 120px;
    background-image: url('images/luigi_sprite.png');
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 9999;
    transition: left 5s linear;
    animation: run 0.5s steps(6) infinite;
}

.coin {
    position: fixed;
    bottom: 10px;
    width: 30px;
    height: 30px;
    background-image: url('/assets/backgrounds/Coin.png');
    background-size: cover;
    z-index: 9998;
    animation: spin 0.5s steps(4) infinite, float-up 3s ease-out forwards;
}

@keyframes run {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -480px 0;
    }
}

@keyframes spin {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -120px 0;
    }
}

@keyframes float-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-300px) scale(0.5);
        opacity: 0;
    }
}

/* Hidden Pipe Easter Egg */
.hidden-pipe {
    position: fixed;
    bottom: -50px;
    right: 50px;
    width: 70px;
    height: 70px;
    background-image: url('images/pipe.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 9997;
    cursor: pointer;
    transition: all 0.5s ease;
    opacity: 0.05;
}

.hidden-pipe:hover {
    transform: translateY(-20px);
    opacity: 1;
}

/* Scroll Animation */
.animate__fadeIn {
    animation-duration: 1.5s;
}

/* Code highlighting */
code {
    background-color: #f0f0f0;
    padding: 3px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

code:hover {
    background-color: #e0e0e0;
    color: var(--secondary-color);
}