/* Global Styles & Variables */
:root {
    --bg-color: #0d0e12;
    /* Deep dark void */
    --card-bg: rgba(26, 31, 44, 0.7);
    /* Translucent for glassmorphism */
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --accent-color: #4ade80;
    /* Vibrant Lime (XP/Magic) */
    --accent-hover: #22c55e;
    --danger-color: #f87171;
    --chaos-color: #c084fc;
    /* Purple for Chaos */
    --gold-color: #fbbf24;
    /* Gold for premium highlights */
    --border-color: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --section-spacing: 4rem;
    --transition-standard: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(74, 222, 128, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(192, 132, 252, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Typography */
h1,
h2,
h3,
h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-top: var(--section-spacing);
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 1.5rem;
}

.warning-text {
    color: var(--danger-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Nav */
header {
    background: rgba(13, 14, 18, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

nav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

nav a.active {
    color: var(--accent-color);
    background: rgba(74, 222, 128, 0.1);
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.2);
}

/* --- Content Sections --- */
.content-section {
    display: none;
    /* Navigation fix: sections hidden by default */
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Selection Screen --- */
.selection-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1f2c 0%, #0d0e12 100%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.selection-screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.1);
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 900px;
    width: 100%;
    margin-top: 3rem;
}

.mod-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.mod-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.mod-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(74, 222, 128, 0.2);
}

.mod-card:hover::before {
    transform: scaleX(1);
}

.mod-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    margin-top: 0 !important;
    /* Overriding default h2 margin */
    border: none !important;
    padding: 0 !important;
}

.mod-card p {
    color: var(--text-secondary);
}

.mod-card.wip {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.mod-card.wip::before {
    background: var(--gold-color);
}

.mod-card.wip:hover {
    border-color: var(--gold-color);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.2);
    transform: none;
}

.badge {
    background: var(--gold-color);
    color: #0d0e12;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
}

.hero img.logo {
    max-width: 250px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 30px rgba(74, 222, 128, 0.2));
    animation: float 6s ease-in-out infinite;
}

.hero img.title-img {
    max-width: 600px;
    width: 100%;
    margin-bottom: 1rem;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Cards & Content Sections */
.content-section {
    padding-bottom: var(--section-spacing);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(74, 222, 128, 0.3);
}

/* Grids */
.boss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.boss-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.boss-item:hover {
    background: rgba(74, 222, 128, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Magic Stats/Requirements Lists */
.requirement-list {
    list-style: none;
    margin: 1rem 0;
}

.requirement-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.requirement-list li::before {
    content: "◈";
    color: var(--accent-color);
}

/* Code Snippets / Commands */
code {
    background: #000;
    color: var(--gold-color);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

kbd {
    background: #333;
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border-bottom: 2px solid #000;
    font-family: inherit;
    font-size: 0.85em;
}

/* Recipe Grid */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
}

.recipe-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.recipe-item:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--accent-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.recipe-item img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    /* Prevention of stretching */
    image-rendering: pixelated;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
}

/* --- Dev Info --- */
.dev-info-container {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin-top: 2rem;
}

.dev-img {
    width: 160px;
    height: 160px;
    border-radius: 24px;
    border: 3px solid var(--accent-color);
    object-fit: cover;
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.3);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dev-img:hover {
    transform: scale(1.05) rotate(3deg);
}

.dev-text {
    flex: 1;
}

/* --- Download Button --- */
.download-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--accent-color);
    color: #0d0e12 !important;
    padding: 1.25rem 3rem;
    border-radius: 16px;
    font-weight: 900;
    text-decoration: none !important;
    text-transform: uppercase;
    font-size: 1.2rem;
    margin-top: 2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: 0 10px 20px rgba(74, 222, 128, 0.2);
    cursor: pointer;
}

.download-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 30px rgba(74, 222, 128, 0.4);
    background: #5fed91;
}

.download-btn span {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* --- Timeline --- */
.timeline {
    margin-top: 3rem;
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.timeline-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* --- Chaos Title Effect --- */
.chaos-title {
    position: relative;
    display: inline-block;
}

.chaos-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--chaos-color);
    opacity: 0.5;
    z-index: -1;
    animation: chaosGlitch 3s infinite;
    display: none;
}

.chaos-title:hover::before {
    display: block;
}

@keyframes chaosGlitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Search */
.search-container {
    margin-bottom: 3rem;
}

#recipe-search {
    width: 100%;
    max-width: 600px;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#recipe-search:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 1);
}

/* Footer */
footer {
    padding: 6rem 0 4rem;
    background: #000;
    color: var(--text-secondary);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.social-links a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 600;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    h1 {
        font-size: 3rem;
    }

    nav ul {
        gap: 0.75rem;
    }
}