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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, #0a1a0a 0%, #1a2d1a 50%, #0f1f0f 100%);
    color: #e8f5e8;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation --- */
nav {
    background: rgba(16, 32, 16, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 2px solid #2d5a2d;
    position: sticky;
    top: 0;
    z-index: 100;
}
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}
nav a {
    color: #90ee90;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
nav a:hover, nav a.active {
    background: rgba(144, 238, 144, 0.1);
    border-color: #4ade80;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
}

/* --- Header --- */
header {
    text-align: center;
    padding: 3rem 0;
    background: radial-gradient(circle at center, rgba(45, 90, 45, 0.3) 0%, transparent 70%);
}
h1 {
    font-size: 3.5rem;
    color: #4ade80;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
    margin-bottom: 1rem;
    font-weight: normal;
}
.subtitle {
    font-size: 1.3rem;
    color: #90ee90;
    opacity: 0.9;
}

/* --- Analytics Panel --- */
.analytics-panel {
    position: fixed;
    top: 120px;
    right: 20px;
    background: rgba(16, 32, 16, 0.95);
    border: 1px solid #2d5a2d;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.85rem;
    min-width: 200px;
    z-index: 50;
    backdrop-filter: blur(10px);
}
.analytics-title {
    color: #4ade80;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-align: center;
}
.stat-item {
    display: flex;
    justify-content: space-between;
    margin: 0.3rem 0;
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(45, 90, 45, 0.3);
}
.stat-label { color: #90ee90; }
.stat-value { color: #4ade80; font-weight: bold; }

/* --- Page Structure --- */
.page { display: none; padding: 2rem 0; }
.page.active { display: block; }

/* --- REUSABLE COMPONENTS --- */
.card {
    background: rgba(16, 32, 16, 0.6);
    border: 1px solid #2d5a2d;
    border-radius: 12px;
    padding: 2.5rem;
    margin: 2rem 0;
}
.page-title {
    font-size: 2.2rem;
    color: #4ade80;
    margin-bottom: 1.5rem;
    text-align: center;
}
.framework-box {
    background: rgba(10, 20, 10, 0.8);
    border: 1px solid #2d5a2d;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    max-width: 900px;
    margin: 0 auto;
}
p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}
.main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.2);
    margin: 0 auto 2rem auto;
    display: block;
}

/* --- Downloads List Specific --- */
#story-download-list { list-style: none; padding: 0; max-width: 700px; margin: 0 auto; }
#story-download-list li { margin-bottom: 1rem; background: rgba(10, 20, 10, 0.6); border-radius: 8px; border: 1px solid #2d5a2d; transition: all 0.3s ease; }
#story-download-list li:hover { border-color: #4ade80; box-shadow: 0 4px 15px rgba(74, 222, 128, 0.2); transform: translateX(5px); }
#story-download-list a { display: block; padding: 1rem 1.5rem; text-decoration: none; color: #e8f5e8; font-size: 1.1rem; }
#story-download-list a::before { content: '📜'; margin-right: 1rem; font-style: normal; }

/* --- Contact & About --- */
.about-section, .contact-section { max-width: 700px; margin-left: auto; margin-right: auto; }
.email-link { background: linear-gradient(45deg, #22c55e, #4ade80); color: #0a1a0a; text-decoration: none; padding: 1rem 2.5rem; border-radius: 12px; font-weight: bold; font-size: 1.1rem; display: inline-block; transition: all 0.3s ease; box-shadow: 0 6px 20px rgba(74, 222, 128, 0.3); }
.contact-description { text-align: center; }

/* --- AI Punk Codex Specifics --- */
.codex-content ul, .codex-supplemental ul, .codex-supplemental ol {
    list-style-position: inside;
    padding-left: 1rem;
    margin-bottom: 1rem;
}
 .codex-content ul li, .codex-supplemental ul li, .codex-supplemental ol li {
    margin-bottom: 0.5rem;
}
.codex-supplemental h3 {
    font-size: 1.8rem;
    color: #4ade80;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
 .codex-supplemental strong {
    color: #90ee90;
}
.codex-supplemental {
    max-width: 900px;
    margin: 2rem auto;
}

/* --- Framework Page Specific --- */
.copy-tooltip {
    text-align: center;
    font-style: italic;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 1rem;
}
.instructions-title {
    font-size: 2.2rem;
    color: #4ade80;
    margin: 2rem 0 1.5rem 0;
    text-align: center;
}
.instructions-text {
    max-width: 900px;
    margin: 0 auto;
}

/* --- Responsive & Animations --- */
@media (max-width: 768px) {
    nav ul { flex-direction: column; gap: 1rem; align-items: center; }
    h1 { font-size: 2.5rem; }
    .analytics-panel { position: static; margin: 1rem 0; width: 100%; }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.page.active { animation: fadeIn 0.5s ease-out; }
