/* 
  Colors based on classic 8-bit Mario
  Red: #E52521
  Blue: #049CD8
  Green: #43B047
  Yellow: #FBD000
  Brown/Brick: #C84C0C
  Sky Blue: #5C94FC
  Dark Brown: #8B4513
*/

:root {
    --mario-red: #E52521;
    --mario-blue: #049CD8;
    --mario-green: #43B047;
    --mario-yellow: #FBD000;
    --mario-brick: #C84C0C;
    --sky-blue: #5C94FC;
    --dark-brown: #8B4513;
    --black: #000000;
    --white: #FFFFFF;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--mario-green);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Crect x='20' y='30' width='4' height='12' fill='%232d7a2f'/%3E%3Crect x='16' y='34' width='4' height='8' fill='%232d7a2f'/%3E%3Crect x='24' y='34' width='4' height='8' fill='%232d7a2f'/%3E%3Crect x='80' y='80' width='4' height='12' fill='%232d7a2f'/%3E%3Crect x='76' y='84' width='4' height='8' fill='%232d7a2f'/%3E%3Crect x='84' y='84' width='4' height='8' fill='%232d7a2f'/%3E%3C/svg%3E");
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Utilities */
.pixel-text {
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
}

h1, h2, h3 {
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }

/* Colors & Backgrounds */
.bg-red { background-color: var(--mario-red); color: var(--white); }
.bg-blue { background-color: var(--mario-blue); color: var(--white); }
.bg-green { background-color: var(--mario-green); color: var(--white); }
.bg-yellow { background-color: var(--mario-yellow); color: var(--black); }
.bg-brown { background-color: var(--dark-brown); color: var(--white); }

.text-white { color: var(--white); }
.text-black { color: var(--black); }
.text-blue { color: var(--mario-blue); }
.text-red { color: var(--mario-red); }
.text-yellow { color: var(--mario-yellow); }

.border-red { border: 4px solid var(--mario-red); }
.border-blue { border: 4px solid var(--mario-blue); }
.border-green { border: 4px solid var(--mario-green); }
.border-yellow { border: 4px solid var(--mario-yellow); }
.border-brown { border: 4px solid var(--dark-brown); }

/* Layout Elements */
.sky-background {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 60px; /* Space for the ground */
}

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--white);
    text-shadow: 3px 3px 0 var(--black);
    background-image: url('bg.png');
    background-size: cover;
    background-position: center 65%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    border-bottom: 6px solid var(--black);
}

.title-bounce {
    font-size: 2rem;
    animation: bounce 2s infinite;
    text-shadow: 4px 4px 0 var(--black), -2px -2px 0 var(--black), 2px -2px 0 var(--black), -2px 2px 0 var(--black), 2px 2px 0 var(--black);
}

@media (min-width: 768px) {
    .title-bounce {
        font-size: 3.5rem;
        text-shadow: 6px 6px 0 var(--black), -2px -2px 0 var(--black), 2px -2px 0 var(--black), -2px 2px 0 var(--black), 2px 2px 0 var(--black);
    }
}

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

.subtitle {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    color: var(--mario-yellow);
    text-shadow: 4px 4px 0 var(--black), -2px -2px 0 var(--black), 2px -2px 0 var(--black), -2px 2px 0 var(--black), 2px 2px 0 var(--black);
}

.start-link {
    display: inline-block;
    text-decoration: none;
    color: var(--mario-yellow);
    transition: transform 0.2s;
}

.start-link:hover {
    transform: scale(1.1);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 1rem 0;
    flex: 1;
}

/* Cards (Sections) */
.card {
    background-color: var(--white);
    border: 6px solid var(--black);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.3);
    margin-bottom: 2.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.card-header {
    padding: 1rem;
    border-bottom: 4px solid var(--black);
    text-align: center;
}

.card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    text-shadow: 2px 2px 0 var(--black);
}

.card-header.bg-yellow h2 {
    text-shadow: 2px 2px 0 rgba(255,255,255,0.5);
}

.card-content {
    padding: 1.5rem;
}

/* About Section */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .about-content {
        flex-direction: row;
        text-align: left;
    }
}

.profile-pic-container {
    flex-shrink: 0;
    width: 200px;
    height: auto;
    border-width: 6px;
    border-style: solid;
}

.profile-pic {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: pixelated; /* Adds a bit of retro feel to the image scaling */
}

.highlight-text {
    background-color: #ffeeb2;
    padding: 0.5rem;
    border-left: 4px solid var(--mario-yellow);
    font-weight: 600;
}

/* Progress Bar */
.progress-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

/* Mission Path */
.mission-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1rem;
}

@media (min-width: 768px) {
    .mission-path {
        flex-direction: row;
    }
}

.mission-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mission-icon-container {
    width: 80px;
    height: 80px;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-shadow: 4px 4px 0 var(--black);
}

.mission-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.step-label {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.mission-arrow {
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 var(--black);
    animation: slideDown 1s steps(3, end) infinite;
}

@media (min-width: 768px) {
    .mission-arrow {
        animation: slideRight 1s steps(3, end) infinite;
    }
}

@keyframes slideRight {
    0% { transform: translateX(0); opacity: 0.3; }
    50% { transform: translateX(5px); opacity: 1; }
    100% { transform: translateX(10px); opacity: 0.3; }
}

@keyframes slideDown {
    0% { transform: translateY(0) rotate(90deg); opacity: 0.3; }
    50% { transform: translateY(5px) rotate(90deg); opacity: 1; }
    100% { transform: translateY(10px) rotate(90deg); opacity: 0.3; }
}

@media (min-width: 768px) {
    .progress-stats {
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
    }
}

.progress-bar-container {
    height: 40px;
    background-color: #ddd;
    border-width: 4px;
    border-style: solid;
    position: relative;
    margin-bottom: 1rem;
    box-shadow: inset 3px 3px 0 rgba(0,0,0,0.2);
}

.progress-bar {
    height: 100%;
    width: 0%; /* Dynamic */
    transition: width 1s ease-in-out;
    position: relative;
    box-shadow: inset 0 -5px 0 rgba(0,0,0,0.2), inset 0 5px 0 rgba(255,255,255,0.3);
}

.charity-note {
    font-weight: 600;
    color: var(--mario-red);
}

/* Buttons */
.pixel-btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: 'Press Start 2P', cursive;
    text-decoration: none;
    border: 4px solid var(--black);
    box-shadow: 4px 4px 0 var(--black);
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.1s;
    cursor: pointer;
}

.pixel-btn:active {
    box-shadow: 0 0 0 var(--black);
    transform: translate(4px, 4px);
}

.btn-massive {
    font-size: 1.2rem;
    padding: 1.2rem 2.5rem;
    background-color: var(--mario-red);
    color: var(--white);
    text-shadow: 2px 2px 0 var(--black);
}

.btn-massive:hover {
    background-color: #ff3333;
}

.shop-cta-container {
    text-align: center;
    margin-top: 2rem;
    width: 100%;
}

/* Shop Section */
.shop-intro {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .shop-intro {
        flex-direction: row;
        text-align: left;
    }
}

.shop-pic {
    width: 250px;
    height: auto;
    object-fit: cover;
    border-width: 6px;
    border-style: solid;
    flex-shrink: 0;
}

.shop-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.coin-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

@media (min-width: 768px) {
    .coin-row {
        gap: 4rem;
    }
}

.coin {
    width: 20px;
    height: 28px;
    background-color: #F8E71C;
    border: 4px solid var(--black);
    border-radius: 8px; /* Blocky corner illusion */
    box-shadow: inset -4px -4px 0 #F5A623, 0 0 15px 2px rgba(248, 231, 28, 0.7);
    display: inline-block;
    /* Use steps() to perfectly mimic retro low-framerate sprite animation! */
    animation: spin-coin 1s steps(8) infinite;
}

@keyframes spin-coin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* Services Stack & Cards */
.services-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2.5rem;
    width: 100%;
}

.service-row-card {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-width: 6px;
    border-style: solid;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.1);
    gap: 2rem;
}

@media (min-width: 768px) {
    .service-row-card {
        flex-direction: row;
        text-align: left;
    }
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 10px 14px 0 rgba(0,0,0,0.2);
}

.service-icon-container {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border: 4px solid var(--black);
    border-radius: 8px;
    overflow: hidden;
    background-color: #333;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 4px 4px 0 rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .service-icon-container {
        margin-bottom: 0;
    }
}

.service-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    transition: transform 0.3s ease;
}

.service-row-card:hover .service-icon {
    transform: scale(1.1);
}

.service-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-row-card h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: block;
}

.service-list {
    list-style-type: none;
    padding-left: 0;
    text-align: left;
    width: 100%;
}

.service-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.4;
}

.service-list li::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.7rem;
    color: var(--mario-red);
}

.border-yellow .service-list li::before { color: var(--mario-yellow); text-shadow: 1px 1px 0 var(--black); }
.border-blue .service-list li::before { color: var(--mario-blue); }

.start-button {
    background-color: var(--mario-yellow);
    color: var(--black);
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1rem;
    padding: 1.5rem 2rem;
    border: 6px solid var(--black);
    box-shadow: 6px 6px 0 var(--black);
    border-radius: 4px;
    margin-top: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.start-button:hover {
    background-color: #ffdf33;
}

.start-button:active {
    box-shadow: 0 0 0 var(--black);
    transform: translate(6px, 6px);
}

.pulse-anim {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Sponsors */
.billboard-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.billboard-slot {
    width: 200px;
    height: 100px;
    background-color: #eee;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-width: 4px;
    border-style: solid;
    text-align: center;
}

.billboard-slot-large {
    width: 100%;
    max-width: 632px; /* Exactly 3 boxes (200x3) + 2 gaps (16x2) */
}

.billboard-slot p {
    font-size: 0.7rem;
    margin: 0;
    color: #666;
}

.billboard-slot .price {
    font-weight: bold;
    color: var(--mario-green);
    margin-top: 0.5rem;
}


.pixel-link {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    text-decoration: underline;
}

/* Investors */
.investor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
    width: 100%;
}

.investor-card {
    background-color: #f9f9f9;
    border: 6px solid var(--black);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.investor-card.available:hover {
    transform: translateY(-8px);
    box-shadow: 10px 14px 0 rgba(0, 0, 0, 0.25);
}

.investor-card-header {
    padding: 1rem;
    border-bottom: 4px solid var(--black);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.investor-card-header h3 {
    margin: 0;
    font-size: 0.8rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.investor-card-header.bg-yellow h3 {
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.investor-price {
    font-size: 0.75rem;
    padding: 6px 10px;
    background-color: var(--white);
    border: 3px solid var(--black);
    box-shadow: 3px 3px 0 var(--black);
    color: var(--black);
    font-weight: bold;
}

.investor-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.investor-prospectus {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

.investor-roi {
    background-color: #ffeeb2;
    padding: 0.8rem;
    border-left: 4px solid var(--mario-yellow);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    border-top: 2px dashed #e2d194;
    border-bottom: 2px dashed #e2d194;
    border-right: 2px dashed #e2d194;
}

.investor-roi strong {
    color: var(--mario-brick);
    display: block;
    margin-bottom: 0.3rem;
}

/* Taken State Styles */
.investor-card.taken {
    background-color: #eaeaea;
    border-color: #555;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.investor-card.taken .investor-card-header {
    background-color: #777 !important;
    color: #ccc !important;
    border-bottom-color: #555;
}

.investor-card.taken .investor-card-header h3 {
    text-shadow: 1px 1px 0 var(--black);
}

.investor-card.taken .investor-price {
    background-color: #ccc;
    border-color: #555;
    box-shadow: 2px 2px 0 #555;
    color: #555;
}

.investor-card.taken .investor-roi {
    background-color: #e5e5e5;
    border-left-color: #777;
    border-color: #ccc;
}

.investor-card.taken .investor-roi strong {
    color: #555;
}

.investor-card.taken .investor-prospectus {
    color: #666;
}

/* Claimed Stamp */
.claimed-stamp {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-12deg);
    background-color: rgba(229, 37, 33, 0.3);
    color: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border: 4px dashed rgba(255, 255, 255, 0.85);
    outline: 4px solid rgba(229, 37, 33, 0.35);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    font-size: 0.95rem;
    z-index: 10;
    pointer-events: none;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
}

/* Investor Avatars */
.investor-backers {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    background-color: #f0f0f0;
    padding: 8px 12px;
    border: 3px solid #555;
    border-radius: 4px;
}

.investor-backers-title {
    font-size: 0.65rem;
    color: #444;
    font-weight: bold;
}

.investor-names {
    font-size: 0.65rem;
    color: #111;
    font-weight: bold;
}

.investor-avatars-list {
    display: flex;
    gap: 0.4rem;
}

.investor-avatar-wrapper {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid var(--black);
    overflow: hidden;
    background-color: #ddd;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

.investor-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Buttons inside investor cards */
.investor-card .pixel-btn {
    width: 100%;
    padding: 1rem;
    font-size: 0.75rem;
    text-align: center;
    box-sizing: border-box;
}

.investor-card.taken .pixel-btn-disabled {
    display: block;
    width: 100%;
    padding: 1rem;
    font-family: 'Press Start 2P', cursive;
    background-color: #888;
    color: #bbb;
    border: 4px solid #555;
    box-shadow: none;
    cursor: not-allowed;
    text-transform: uppercase;
    font-size: 0.7rem;
    text-align: center;
}

/* Ground Pattern */
.ground-pattern {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--mario-brick);
    background-image: 
        linear-gradient(45deg, var(--dark-brown) 25%, transparent 25%, transparent 75%, var(--dark-brown) 75%, var(--dark-brown)),
        linear-gradient(45deg, var(--dark-brown) 25%, transparent 25%, transparent 75%, var(--dark-brown) 75%, var(--dark-brown));
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    border-top: 6px solid var(--black);
}

.footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    margin-top: auto;
}

.footer p {
    font-size: 0.6rem;
    margin: 0;
}

/* Supporting Players */
.supporting-players-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
    text-align: center;
}

.supporting-player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.supporting-player-card .profile-pic-container {
    width: 180px;
    margin-bottom: 1rem;
}

/* Media queries handled mobile-first throughout the file */

/* Mission Updates Styling */
.update-item {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .update-item {
        flex-direction: row;
        text-align: left;
    }
}

.update-date {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--white);
    background-color: var(--mario-brick);
    padding: 6px 10px;
    border: 3px solid var(--black);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
}

.update-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .update-gallery {
        width: 240px;
        flex-shrink: 0;
        margin-bottom: 0;
    }
}

.gallery-pic-container {
    border: 4px solid var(--black);
    overflow: hidden;
    background-color: #eee;
    width: 100%;
}

.gallery-pic-container.portrait {
    grid-column: span 1;
    aspect-ratio: 9 / 16;
}

.gallery-pic-container.landscape {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

.gallery-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.update-divider {
    border: 0;
    height: 6px;
    background-color: var(--black);
    margin: 2.5rem 0;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

/* Image Modal / Lightbox */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 80vh;
    border: 6px solid var(--black);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.5);
    animation: zoom 0.25s ease-out;
}

@keyframes zoom {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.modal-close:hover {
    color: var(--mario-red);
}

.expandable-pic {
    cursor: pointer;
    transition: filter 0.2s ease;
}

.expandable-pic:hover {
    filter: brightness(1.08);
}

/* Star Jump Animation */
.star-jump {
    display: inline-block;
    animation: star-bounce 1s infinite alternate ease-in-out;
}

@keyframes star-bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}
