/* Reset e variabili */
:root {
    --primary-color: #ff1744;
    --secondary-color: #1a1a2e;
    --accent-color: #16213e;
    --text-light: #ffffff;
    --text-dark: #0f0f0f;
    --text-gray: #aaaaaa;
    --hover-color: #ff4569;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
}

/* Collapsible Devlog System */
.collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.timeline-item.active .collapsible {
    max-height: 2000px; /* enough for long content */
}

.expand-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.modding-link {
    text-decoration: none; /* togli il sottolineato del link */
    color: inherit; /* mantiene il colore del testo */
    display: block; /* fa sì che l'intero div sia cliccabile */
}


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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navbar */
.navbar {
    background-color: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(255, 23, 68, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f0f 100%);
    overflow: hidden;
    margin-top: 70px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 23, 68, 0.03) 0px,
        transparent 1px,
        transparent 2px,
        rgba(255, 23, 68, 0.03) 3px
    );
    animation: scanlines 10s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero-logo {
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

.hero-logo-img {
    max-width: 250px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(255, 23, 68, 0.6));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.hero h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow: 0 0 20px rgba(255, 23, 68, 0.5);
}

.glitch {
    position: relative;
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 23, 68, 0.5); }
    25% { text-shadow: -2px 0 0 rgba(255, 23, 68, 0.8), 2px 0 0 rgba(22, 33, 62, 0.8); }
    50% { text-shadow: 2px 0 0 rgba(255, 23, 68, 0.8), -2px 0 0 rgba(22, 33, 62, 0.8); }
    75% { text-shadow: -2px 0 0 rgba(255, 23, 68, 0.8), 2px 0 0 rgba(22, 33, 62, 0.8); }
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    font-style: italic;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 5px 15px rgba(255, 23, 68, 0.3);
}

.btn-primary:hover {
    background-color: var(--hover-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 23, 68, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--secondary-color);
}

/* Sections */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

/* About Section */
.about {
    background-color: var(--accent-color);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.about-card {
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid rgba(255, 23, 68, 0.2);
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 23, 68, 0.3);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.about-card p {
    color: var(--text-gray);
    line-height: 1.8;
}

/* Download Section */
.download {
    background-color: var(--secondary-color);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.download-card {
    background-color: var(--accent-color);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
    border: 2px solid rgba(255, 23, 68, 0.2);
    transition: all 0.3s ease;
}

.download-card:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 23, 68, 0.4);
}

.download-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.download-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.btn-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary-color);
    font-weight: bold;
}

/* Video Container */
.video-container {
    margin-top: 60px;
    text-align: center;
}

.video-container h3 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.video-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Lore Section */
.lore {
    background-color: var(--accent-color);
}

.lore-content {
    max-width: 900px;
    margin: 0 auto;
}

.lore-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 25px;
    color: var(--text-gray);
    text-align: center;
}

.warning-box {
    background-color: rgba(255, 152, 0, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 20px;
    margin-top: 30px;
    border-radius: 5px;
}

.warning-box strong {
    color: var(--warning-color);
}

/* Modding Section */
.modding {
    background-color: var(--secondary-color);
}

.modding-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 50px;
}

.modding-info h3 {
    color: var(--primary-color);
    margin: 30px 0 20px 0;
    font-size: 1.5rem;
}

.modding-info ul {
    list-style: none;
    margin-bottom: 30px;
}

.modding-info li {
    padding: 10px 0;
    font-size: 1.1rem;
    color: var(--text-gray);
}

.highlight {
    background-color: rgba(255, 23, 68, 0.1);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    color: var(--text-light);
}

.modding-visual {
    text-align: center;
    background-color: var(--accent-color);
    padding: 50px;
    border-radius: 10px;
    border: 2px dashed var(--primary-color);
}

.mod-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

/* Community Section */
.community {
    background-color: var(--accent-color);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.social-card {
    background-color: var(--secondary-color);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
    border: 2px solid rgba(255, 23, 68, 0.2);
    transition: all 0.3s ease;
}

.social-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 23, 68, 0.3);
}

.social-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.social-icon img {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0.9);
    transition: all 0.3s ease;
}

.social-card:hover .social-icon img {
    filter: brightness(1.1) drop-shadow(0 0 20px rgba(255, 23, 68, 0.5));
    transform: scale(1.1);
}

.social-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.social-card p {
    color: var(--text-gray);
}

/* Devlog Specific Styles */
.devlog-hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    padding: 150px 0 100px 0;
    text-align: center;
    margin-top: 70px;
}

.devlog-hero h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.devlog-content {
    background-color: var(--secondary-color);
    padding: 80px 0;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.timeline-item {
    position: relative;
    margin-bottom: 80px;
    width: calc(50% - 40px);
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: calc(50% + 40px);
    text-align: left;
}

.timeline-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border: 4px solid var(--secondary-color);
    border-radius: 50%;
    top: 0;
    z-index: 2;
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.5);
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -50px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -50px;
}

.timeline-content {
    background-color: var(--accent-color);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid rgba(255, 23, 68, 0.2);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 23, 68, 0.3);
}

.version-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 23, 68, 0.2);
}

.timeline-item:nth-child(odd) .version-header {
    text-align: right;
}

.timeline-item:nth-child(even) .version-header {
    text-align: left;
}

.version-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: inherit;
}

.version-date {
    color: var(--text-gray);
    font-style: italic;
}

.version-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 10px;
}

.version-badge.latest {
    background-color: var(--success-color);
    color: white;
}

.version-badge.major {
    background-color: var(--primary-color);
    color: white;
}

.version-badge.initial {
    background-color: var(--accent-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.version-badge.future {
    background-color: var(--warning-color);
    color: white;
}

.version-body {
    text-align: left;
}

.version-body h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.changelog {
    list-style: none;
    margin-bottom: 25px;
}

.changelog li {
    padding: 10px 0;
    font-size: 1.05rem;
    color: var(--text-gray);
    line-height: 1.6;
}

.changelog .added::before {
    content: '🆕 ';
}

.changelog .improved::before {
    content: '✨ ';
}

.changelog .fixed::before {
    content: '🐛 ';
}

.changelog .planned::before {
    content: '📋 ';
}

.feature-highlight {
    background-color: rgba(255, 23, 68, 0.1);
    padding: 20px;
    border-radius: 5px;
    margin: 25px 0;
    border-left: 4px solid var(--primary-color);
}

.feature-highlight h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-highlight p {
    color: var(--text-gray);
    margin-bottom: 10px;
}

.version-video {
    margin-top: 30px;
}

.version-video iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
}

.version-actions {
    margin-top: 25px;
}

.timeline-item.future {
    opacity: 0.8;
}

.timeline-item.future .timeline-content {
    border-style: dashed;
}

.devlog-contribute {
    background-color: var(--accent-color);
    text-align: center;
    padding: 80px 0;
}

.devlog-contribute h2 {
    margin-bottom: 20px;
}

.devlog-contribute p {
    color: var(--text-gray);
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.contribute-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Footer */
footer {
    background-color: var(--accent-color);
    padding: 40px 0;
    text-align: center;
    border-top: 2px solid rgba(255, 23, 68, 0.2);
}

.footer-links {
    margin-top: 20px;
    display: flex;
    gap: 30px;
    justify-content: center;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* CODE BLOCK / IDE STYLE */
pre {
    background-color: #1e1e2f; /* IDE dark background */
    color: #f8f8f2; /* Light text for code */
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    border-left: 5px solid var(--primary-color);
}

/* Optional: pseudo line numbers */
pre code {
    display: block;
    counter-reset: linenumber;
}

pre code span {
    display: block;
    padding-left: 50px;
    position: relative;
}

pre code span::before {
    counter-increment: linenumber;
    content: counter(linenumber);
    position: absolute;
    left: 10px;
    color: var(--text-gray);
    font-size: 0.85rem;
    user-select: none;
}

/* JSON highlighting */
pre code {
    color: #f8f8f2;
}

pre code .key {
    color: #ff79c6;
}

pre code .string {
    color: #f1fa8c;
}

pre code .number {
    color: #8be9fd;
}

pre code .boolean {
    color: #50fa7b;
}

pre code .null {
    color: #ffb86c;
}

/* Modding Documentation Page */
.modding-doc {
    padding: 120px 0;
    background-color: var(--secondary-color);
}

.modding-doc h2,
.modding-doc h3 {
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 15px;
}

.modding-doc p {
    color: var(--text-gray);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.modding-doc ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.modding-doc li {
    padding: 5px 0;
    color: var(--text-gray);
}

.note-box {
    background-color: rgba(255, 23, 68, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .hero-logo-img {
        max-width: 150px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .about-grid,
    .download-grid,
    .social-grid {
        grid-template-columns: 1fr;
    }
    
    .modding-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 40px !important;
        text-align: left !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-marker,
    .timeline-item:nth-child(even) .timeline-marker {
        left: -30px;
    }
    
    .timeline-item:nth-child(odd) .version-header {
        text-align: left;
    }

    
}