/* 
   🎨 COZY VILLAGE - MASTER STYLESHEET 
   Theme: Cozy Night (Deep Blue & Neon Pastels)
   Style: Super Bubbly & Soft
*/

@import url('https://fonts.googleapis.com/css2?family=DynaPuff:wght@400;600;700&family=Fredoka:wght@400;500;600;700&display=swap');

:root {
    /* 🌙 Palette Colors */
    --bg-deep: #1F2029;
    /* Midnight Base */
    --bg-soft: #282A3A;
    /* Lighter for cards */
    --text-cream: #FFF9F0;
    /* Off-white text */
    --text-muted: #9BA0B8;
    /* Soft Grey */

    /* 🍬 Neon Pastels */
    --accent-cyan: #7AFDD6;
    --accent-pink: #FF7EB3;
    --accent-mint: #A5F8D3;

    /* 🫧 Shapes */
    --radius-pill: 50px;
    --radius-card: 25px;

    /* ✨ Effects */
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(122, 253, 214, 0.2);

    /* 🔡 Typography (Thicker & Rounder) */
    --font-heading: 'DynaPuff', cursive;
    /* Ultra Bubbly */
    --font-body: 'Fredoka', sans-serif;
    /* Very Rounded & Readable */
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

html::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

body {
    background-color: var(--bg-deep);
    /* Adding the requested background image with a dark overlay for readability */
    background-image:
        linear-gradient(rgba(31, 32, 41, 0.85), rgba(31, 32, 41, 0.95)),
        url('../img/cozy_village_pencil_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-cream);
    font-family: var(--font-body);
    font-weight: 500;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(31, 32, 41, 0.85);
    /* Semi-transparent */
    backdrop-filter: blur(12px);
    /* Blur effect */
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent-cyan);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;

    /* Absolute Centering */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* --- NAVIGATION LINKS --- */
.nav-item {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-cyan);
    transition: width 0.3s;
    border-radius: 10px;
}

.nav-item:hover {
    color: var(--text-cream);
}

.nav-item:hover::after {
    width: 100%;
}

/* Language Switcher */
.btn-lang {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-lang:hover {
    background: var(--bg-soft);
    color: var(--text-cream);
    border-color: var(--accent-cyan);
}

.btn-lang span {
    opacity: 0.5;
}

.btn-lang span.active {
    opacity: 1;
    color: var(--accent-cyan);
}

/* Back to Portfolio Link */
.nav-back-portfolio {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-back-portfolio:hover {
    color: var(--accent-pink);
}

/* --- 3D DISCORD BUTTON --- */
.btn-discord {
    background: #5865F2;
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-family: var(--font-heading);
    box-shadow: 0 5px 0 #404EED, 0 10px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.1s;
    position: relative;
    top: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-discord:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-discord:active {
    top: 5px;
    box-shadow: 0 0 0 #404EED;
    transform: translateY(0);
}

/* --- CLICK PARTICLE ANIMATION --- */
.click-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    background: var(--accent-cyan);
    animation: popParticle 0.6s ease-out forwards;
    z-index: 9999;
}

@keyframes popParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px;
    background: radial-gradient(circle at 50% 30%, #2a2c3d 0%, var(--bg-deep) 70%);
}

.badge-new {
    background: rgba(255, 126, 179, 0.15);
    color: var(--accent-pink);
    border: 1px solid rgba(255, 126, 179, 0.3);
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 30px;
    display: inline-block;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-cream);
}

.hero h1 span {
    color: var(--accent-cyan);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 50px;
}

/* --- 3D CARTOON BUTTONS --- */
.actions-group {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    perspective: 1000px;
    /* For hover effects */
}

/* Base 3D Button */
.btn-3d {
    position: relative;
    border: none;
    outline: none;
    font-family: 'Chewy', cursive;
    /* Fun font */
    font-size: 1.6rem;
    padding: 18px 45px;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.1s cubic-bezier(0.4, 0, 1, 1);
    top: 0;
    /* Default position */
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Primary (Play Beta) - Blue */
.btn-primary {
    background-color: #60A5FA;
    /* Sky Blue */
    color: white;
    /* The 3D Depth Shadow */
    box-shadow:
        0 8px 0 #2563EB,
        /* Darker Blue Depth */
        0 15px 20px rgba(0, 0, 0, 0.25),
        /* Drop Shadow */
        inset 0 4px 10px rgba(255, 255, 255, 0.2);
    /* Inner highlight */
}

/* Tooltip "Soon!" logic (Scoped to Hero Actions) */
.actions-group .btn-primary::after {
    content: "Coming Soon... 🚧";
    /* Already English effectively, but ensuring consistency */
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--text-cream);
    color: var(--bg-deep);
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10;
}

/* Little triangle for speech bubble */
.actions-group .btn-primary::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 8px;
    border-style: solid;
    border-color: var(--text-cream) transparent transparent transparent;
    opacity: 0;
    transition: all 0.3s;
    z-index: 10;
}

.btn-primary:hover::after,
.btn-primary:hover::before,
.btn-primary.clicked::after,
.btn-primary.clicked::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Secondary (Trailer) - Pink/Purple */
.btn-secondary {
    background-color: #3B3E52;
    /* Dark Grey */
    color: #E2E8F0;
    border: 3px solid #E2E8F0;
    box-shadow:
        0 8px 0 #1E293B,
        0 15px 20px rgba(0, 0, 0, 0.25);
}

/* Hover State */
.btn-3d:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ACTIVE STATE (The Satisfying "Click") */
.btn-3d:active {
    top: 8px;
    /* Push down exactly the height of the shadow */
    box-shadow:
        0 0 0 #2563EB,
        /* Squash the 3D shadow */
        inset 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

/* Secondary Active */
.btn-secondary:active {
    top: 8px;
    box-shadow: 0 0 0 #1E293B;
}

/* --- FLOATING VFX PARTICLES --- */
.vfx-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    opacity: 0.6;
    animation: floatAround 10s ease-in-out infinite;
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(122, 253, 214, 0.4));
}

.p1 {
    top: 20%;
    left: 15%;
    color: var(--accent-cyan);
    animation-duration: 12s;
    animation-delay: 0s;
}

.p2 {
    top: 60%;
    right: 10%;
    color: var(--accent-pink);
    animation-duration: 15s;
    animation-delay: 2s;
    font-size: 1.2rem;
}

.p3 {
    bottom: 15%;
    left: 30%;
    color: var(--accent-mint);
    animation-duration: 18s;
    animation-delay: 1s;
}

.p4 {
    top: 30%;
    right: 25%;
    color: #FCD34D;
    animation-duration: 14s;
    animation-delay: 3s;
    font-size: 2rem;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-10deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* --- GAMEPLAY GRID --- */
.gameplay-section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-soft);
    padding: 40px 30px;
    border-radius: var(--radius-card);
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.feature-card:hover {
    transform: translateY(-10px);
    background: #2D3042;
}

.icon-box {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 25px;
    font-size: 1.8rem;
    color: var(--accent-cyan);
}

.icon-box.pink {
    color: var(--accent-pink);
}

.icon-box.mint {
    color: var(--accent-mint);
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- DEVLOG (Specific) --- */
.devlog-header {
    text-align: center;
    padding: 120px 20px 60px;
}

.devlog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 5% 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.log-card {
    background: var(--bg-soft);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: all 0.3s;
}

.log-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.log-img {
    height: 180px;
    background: #3B3E52;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.1);
    font-size: 3rem;
}

.log-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.log-content {
    padding: 25px;
}

.log-tag {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-pink);
    margin-bottom: 10px;
    display: block;
}

.log-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-cream);
}

.log-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.btn-read {
    background: transparent;
    border: none;
    color: var(--accent-cyan);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    margin-top: auto;
    /* Push to bottom if flex column */
    transition: all 0.3s;
}

.btn-read:hover {
    color: var(--text-cream);
    transform: translateX(5px);
    text-shadow: 0 0 10px rgba(122, 253, 214, 0.4);
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-deep);
    padding: 2px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;

    /* Hide Scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-overlay.active .modal-content {
    animation: boingPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes boingPop {
    0% {
        transform: scale(0.5) translateY(50px);
        opacity: 0;
    }

    50% {
        transform: scale(1.05) translateY(-10px);
        opacity: 1;
    }

    70% {
        transform: scale(0.95) translateY(5px);
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 18px;
    background: black;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- DEVLOG CONTROLS --- */
#searchInput:focus {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 15px rgba(122, 253, 214, 0.2);
}

.filter-btn {
    transition: all 0.3s;
    font-family: var(--font-body);
}

.filter-btn:hover {
    background: #3B3E52 !important;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--accent-cyan) !important;
    color: var(--bg-deep) !important;
    box-shadow: 0 0 15px rgba(122, 253, 214, 0.4);
}

/* --- POST MODAL CONTENT --- */
.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 20px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-cream);
    margin-bottom: 15px;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-content-text {
    line-height: 1.8;
    color: #E2E8F0;
    font-size: 1.1rem;
    margin: 30px 0;
}

.modal-content-text h2 {
    color: var(--accent-cyan);
    margin: 30px 0 15px;
    font-family: var(--font-heading);
}

.modal-content-text strong {
    color: var(--accent-pink);
}

.modal-content-text blockquote {
    border-left: 4px solid var(--accent-mint);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-muted);
}

.modal-tags .tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 10px;
    color: var(--accent-cyan);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .navbar {
        padding: 20px;
    }

    .nav-links {
        display: none;
    }

    /* Simplified mobile menu for now */
}