/* Farm Pixel Day Design System (v4 - Stardew Style) */
:root {
    /* Palette: Farm Day */
    --color-bg-sky: #BAE6FD;
    /* Sky Blue */
    --color-bg-cloud: #F0F9FF;
    /* Cloud White */
    --color-wood: #78350F;
    /* Wood Brown */
    --color-wood-light: #92400E;

    --color-text-main: #422006;
    /* Dark Brown Text */
    --color-text-muted: #713F12;

    --color-border: #422006;
    /* Dark Wood Border */

    /* Accents */
    --color-yellow: #FACC15;
    --color-orange: #F97316;
    --color-grass: #4ADE80;

    --border-width: 3px;
    --shadow-distance: 4px;

    --font-heading: 'VT323', monospace;
    --font-body: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-sky);
    /* Cloud Pattern */
    background-image:
        radial-gradient(#F0F9FF 20%, transparent 20%),
        radial-gradient(#F0F9FF 20%, transparent 20%);
    background-position: 0 0, 50px 50px;
    background-size: 100px 100px;

    font-family: var(--font-body);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Utilities --- */
.pixel-border {
    border: var(--border-width) solid var(--color-border);
    box-shadow: var(--shadow-distance) var(--shadow-distance) 0 rgba(0, 0, 0, 0.2);
}

.section-padding {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Header --- */
.game-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    /* Taller for the stacked logo */
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
    border-bottom: 4px solid var(--color-wood);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

/* --- CUSTOM LOGO CSS --- */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    line-height: 0.8;
    transform: rotate(-2deg);
    cursor: pointer;
    transition: transform 0.2s;
}

.logo-container:hover {
    transform: rotate(0deg) scale(1.05);
}

.logo-top {
    font-size: 1.2rem;
    color: var(--color-text-main);
    letter-spacing: 2px;
}

.logo-main-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-word {
    font-size: 3rem;
    color: var(--color-yellow);
    /* 3D Pixel Text Shadow */
    text-shadow:
        2px 2px 0px #D97706,
        4px 4px 0px var(--color-border);
    -webkit-text-stroke: 1px var(--color-border);
}

.logo-connector {
    font-size: 1.5rem;
    color: #FFF;
    text-shadow: 2px 2px 0 var(--color-border);
    margin-top: 10px;
    /* Align slightly lower */
}

/* --- Nav --- */
.nav-menu {
    display: flex;
    gap: 20px;
    list-style: none;
    background: var(--color-wood);
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #3F1D0B;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    text-decoration: none;
    color: #FFF;
    text-shadow: 1px 1px 0 #000;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--color-yellow);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    /* Body bg shows through */
}

.pixel-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    image-rendering: pixelated;
    opacity: 0.8;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 50px;
    border: 6px solid var(--color-wood);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    /* Slight rounding for wood plank feel */
    max-width: 800px;
}

.main-title {
    /* Main H1 is now essentially the same style as logo but simpler for SEO, 
       we can hide it or style it similarly if users want a big title here too */
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--color-orange);
    line-height: 0.9;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0 var(--color-border);
    display: flex;
    /* Flex to align swords with text */
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.hero-icon-small {
    height: 1.2em;
    width: auto;
    vertical-align: text-bottom;
    margin: 0 8px;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.2));
    display: inline-block;
    transition: transform 0.3s;
}

.hero-icon-small:hover {
    transform: scale(1.2) rotate(10deg);
}

.subtitle {
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: var(--color-text-main);
    font-weight: bold;
}

.press-start-btn {
    font-family: var(--font-heading);
    font-size: 2rem;
    padding: 15px 50px;
    background: var(--color-grass);
    color: #FFF;
    border: 3px solid var(--color-border);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.15s;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.press-start-btn:hover {
    transform: translateY(-4px);
    box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.3);
    background: #22C55E;
}

/* --- Section Title --- */
.section-title-wrapper {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--color-wood);
    background: #FEF3C7;
    /* Paper/Parchment */
    padding: 10px 40px;
    border: 3px solid var(--color-wood);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
    transform: rotate(-1deg);
    display: inline-block;
}

/* --- Players Section --- */
.players-section {
    background: #DCFCE7;
    /* Light Green */
    border-top: 4px solid var(--color-grass);
    border-bottom: 4px solid var(--color-grass);
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.player-card {
    background: #FFF;
    border: 4px solid var(--color-border);
    padding: 15px;
    width: 320px;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.player-avatar-frame {
    height: 220px;
    background: #E2E8F0;
    border: 3px solid var(--color-border);
    margin-bottom: 15px;
    overflow: hidden;
}

.player-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.player-name {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: #FFF;
    background: var(--color-orange);
    /* Farm vibe orange */
    display: inline-block;
    padding: 2px 12px;
    margin-bottom: 10px;
    border: 2px solid var(--color-border);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.stats-box {
    margin-bottom: 15px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-text-main);
}

.bar {
    flex-grow: 1;
    height: 12px;
    background: #E2E8F0;
    border: 1px solid var(--color-border);
    margin-left: 10px;
}

.fill {
    height: 100%;
    background: var(--color-grass);
}

/* --- Videos Section --- */
.videos-section {
    background: #FEF9C3;
    /* Light Yellow */
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.video-card {
    background: #FFF;
    border-radius: 10px;
    border: 4px solid var(--color-border);
    padding: 5px;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.1);
    aspect-ratio: 16/9;
    transition: transform 0.3s;
}

.video-card:hover {
    transform: scale(1.03);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    border-radius: 6px;
}

.video-title {
    margin-top: 10px;
    text-align: center;
    color: var(--color-text-main);
    font-weight: bold;
}

/* --- Blog Section (Manual) --- */
.blog-section {
    background: #FFFBEB;
    /* Paper */
}

.blog-manual-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    background: #FFF;
    border: 4px solid var(--color-wood);
    padding: 40px;
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    /* Paper Texture effect if desired, simplistic for now */
}

.blog-manual-layout::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    border-left: 2px dashed #CCC;
}

.post-card {
    margin-bottom: 30px;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 20px;
}

.post-meta {
    font-family: var(--font-heading);
    color: var(--color-wood-light);
    font-size: 1.1rem;
}

.post-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--color-text-main);
}

.sidebar-box {
    background: #F8FAFC;
    border: 2px solid var(--color-border);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    font-family: var(--font-heading);
    color: var(--color-wood);
    border-bottom: 2px solid var(--color-wood-light);
    margin-bottom: 15px;
}

/* --- Gallery Section (Taped Scapbook) --- */
.gallery-section {
    background: #E0F2FE;
    overflow: hidden;
    /* For sticking out rotations */
}

.gallery-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 40px 0;
}

.polaroid {
    background: #FFF;
    padding: 15px 15px 50px 15px;
    /* More bottom padding for captions */
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    margin: -15px;
    /* Negative margin for overlap */
    position: relative;
    transform: rotate(var(--rotation));
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
    width: 250px;
    cursor: pointer;
}

/* Washi Tape Effect */
.polaroid::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 60px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.6);
    /* Translucent Tape */
    border-left: 2px dashed rgba(0, 0, 0, 0.1);
    border-right: 2px dashed rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Specific Tape Colors based on nth-child for variety */
.polaroid:nth-child(1)::before {
    background-color: rgba(248, 113, 113, 0.7);
    transform: translateX(-50%) rotate(-5deg);
}

/* Red Tape */
.polaroid:nth-child(2)::before {
    background-color: rgba(96, 165, 250, 0.7);
    transform: translateX(-50%) rotate(3deg);
}

/* Blue Tape */
.polaroid:nth-child(3)::before {
    background-color: rgba(52, 211, 153, 0.7);
    transform: translateX(-50%) rotate(-3deg);
}

/* Green Tape */
.polaroid:nth-child(4)::before {
    background-color: rgba(251, 191, 36, 0.7);
    transform: translateX(-50%) rotate(5deg);
}

/* Yellow Tape */

.polaroid:hover {
    transform: scale(1.15) rotate(0deg) translateY(-10px);
    z-index: 100;
    /* Bring to front */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.polaroid img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #E2E8F0;
    pointer-events: none;
    /* Prevent drag issues */
}

.polaroid-caption {
    font-family: 'Permanent Marker', cursive, var(--font-heading);
    /* Fallback to heading if Marker not available */
    color: #1E293B;
    text-align: center;
    margin-top: 15px;
    font-size: 1.4rem;
    transform: rotate(-1deg);
}

/* --- Social Section (Frameless 8-bit) --- */
.social-section {
    background: var(--color-wood);
    color: #FFF;
    text-align: center;
}

.social-section .section-title {
    background: #FFF;
    color: var(--color-wood);
}

.inventory-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    /* Wider gap for big icons */
    padding: 30px;
    /* Removed background/borders for frameless look */
}

.inventory-slot {
    /* Removed width/height restrictions and slot styling */
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
    /* In case they are anchors */
}

.inventory-slot:hover {
    transform: scale(1.1) rotate(-5deg);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
    z-index: 10;
}

.social-icon-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(5px 5px 0 rgba(0, 0, 0, 0.3));
    /* Pixel shadow for the icon itself */
    image-rendering: pixelated;
    /* Keep crisp edges */
    transition: filter 0.2s;
}

/* --- Contact Section (The Post Office) --- */
.contact-section {
    background: #FFFAF0;
    /* Floral White */
    border-top: 4px solid var(--color-wood);
}

.contact-envelope {
    background: #FFF;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    border: 2px solid #E2E8F0;
    box-shadow:
        0 0 0 10px #F0F9FF,
        /* Envelope padding */
        0 0 0 14px var(--color-wood-light),
        /* Envelope border */
        10px 10px 20px rgba(0, 0, 0, 0.1);
    transform: rotate(1deg);
    position: relative;
}

/* Stamp Decoration */
.contact-envelope::after {
    content: 'POST';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 70px;
    border: 3px dashed var(--color-danger);
    color: var(--color-danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    transform: rotate(10deg);
    opacity: 0.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group label {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-wood);
    display: block;
    margin-bottom: 5px;
}

.pixel-input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 2px dashed var(--color-wood-light);
    background: transparent;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-text-main);
    transition: all 0.3s;
}

.pixel-input:focus {
    outline: none;
    border-bottom: 2px solid var(--color-orange);
    background: rgba(249, 115, 22, 0.05);
}

.send-btn {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    background: var(--color-wood);
    color: #FFF;
    border: none;
    padding: 10px;
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--color-wood-light);
    margin-top: 10px;
    transition: transform 0.2s;
}

.send-btn:hover {
    transform: translateY(-2px);
    background: var(--color-wood-light);
}

.email-direct-box {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px dashed #E2E8F0;
}

.email-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-sky);
    color: #0d4a75;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    padding: 10px 20px;
    border: 2px solid #0d4a75;
    border-radius: 4px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.email-btn:hover {
    transform: translateY(-2px);
    background: #7DD3FC;
}

/* --- CTA (Fixed Visibility - Notice Board) --- */
.cta-section {
    background: url('./assets/background.png');
    /* Use pixel bg but darkened or Wood pattern */
    background-color: #3F1D0B;
    /* Fallback dark wood */
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.final-boss-box {
    background: #FEF3C7;
    /* Parchment/Paper */
    padding: 40px 60px;
    border: 8px solid var(--color-wood);
    /* Wood Frame */
    box-shadow:
        0 0 0 2px #5B2C08,
        /* Inner detail */
        10px 10px 20px rgba(0, 0, 0, 0.5);
    max-width: 700px;
    width: 90%;
    transform: rotate(-1deg);
}

/* Nails in the corners of the board */
.final-boss-box::before,
.final-boss-box::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #713F12;
    border-radius: 50%;
    box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
}

.final-boss-box::before {
    top: 10px;
    left: 10px;
}

.final-boss-box::after {
    top: 10px;
    right: 10px;
}

.hero-content {
    position: relative;
    z-index: 2;
    background: #FFF;
    /* Restore White Board background */
    padding: 30px 50px;
    border: 4px solid var(--color-wood);
    /* Brown Border */
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.2);
    transform: rotate(-1deg);
    /* Slight jaunty angle */
    max-width: 800px;
}

.final-boss-box h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--color-wood);
    margin-bottom: 20px;
    text-shadow: none;
    /* Removed heavy shadow for readability on light bg */
}

.main-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    margin-bottom: 0px;
    /* ... existing text styles ... */
    text-shadow: 4px 4px 0px var(--color-wood-light);
}

.subtitle {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 30px;
    background: transparent;
    /* Ensure no conflict */
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mega-button {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: #FFF;
    background: var(--color-orange);
    padding: 15px 40px;
    text-decoration: none;
    border: 3px solid #7C2D12;
    display: inline-block;
    transition: all 0.2s;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
}

.mega-button:hover {
    background: #F59E0B;
    transform: scale(1.05);
}

/* --- Footer --- */
.game-footer {
    background: #3F1D0B;
    color: #D6D3D1;
    padding: 40px;
    text-align: center;
    font-family: var(--font-heading);
    border-top: 4px solid #78350F;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .game-header {
        height: auto;
        padding: 20px;
        flex-direction: column;
        gap: 10px;
    }

    .nav-menu {
        display: none;
    }

    /* Add hamburger later if needed */
    .logo-word {
        font-size: 2rem;
    }

    .final-boss-box h2 {
        font-size: 2.5rem;
    }

    .contact-envelope {
        width: 95%;
        padding: 20px;
    }
}