/*
Theme Name: MakeLab Retro
Theme URI: https://makelab.dev
Description: Un tema retro-futuristico per DIY, arcade, retrocomputer e maker culture. Con effetti pixelati, colori neon e vibes anni '80-'90.
Author: MakeLab
Version: 1.0.0
Template: twentytwentyfive
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: makelab-retro
Tags: arcade, retro, diy, gaming, pixel-art, neon, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
    /* Colori principali retro/arcade */
    --neon-pink: #ff10f0;
    --neon-cyan: #00ffff;
    --neon-green: #39ff14;
    --neon-orange: #ff6600;
    --neon-purple: #b024ff;
    --neon-yellow: #ffff00;
    
    /* Colori di sfondo */
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --card-bg: #1a1a2e;
    --code-bg: #16213e;
    
    /* Colori del testo */
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --text-accent: var(--neon-cyan);
    
    /* Font */
    --font-main: 'Press Start 2P', 'Courier New', monospace;
    --font-body: 'Share Tech Mono', 'Courier New', monospace;
}

/* Import font pixelati */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&display=swap');

/* Reset e base */
body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Effetto scanlines (CRT) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
    animation: scanlines 8s linear infinite;
}

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

/* Effetto vignette */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 9998;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--card-bg) 100%);
    border-bottom: 3px solid var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan);
    padding: 2rem 0;
    position: relative;
}

/* Custom Logo */
.custom-logo-link {
    display: inline-block;
    margin-bottom: 1rem;
}

.custom-logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 3px solid var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan);
    transition: all 0.3s ease;
}

.custom-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--neon-pink);
    border-color: var(--neon-pink);
}

.site-title {
    font-family: var(--font-main);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 30px var(--neon-cyan);
    margin: 0;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
    96% {
        transform: translate(-2px, -2px);
    }
    98% {
        transform: translate(2px, 2px);
    }
}

.site-description {
    color: var(--neon-green);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-shadow: 0 0 5px var(--neon-green);
}

/* Navigation */
.main-navigation {
    margin-top: 1rem;
}

.main-navigation ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.main-navigation a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid var(--neon-pink);
    background: rgba(255, 16, 240, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.main-navigation a::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 16, 240, 0.4), transparent);
    transition: left 0.5s;
}

.main-navigation a:hover::before {
    left: 100%;
}

.main-navigation a:hover {
    background: rgba(255, 16, 240, 0.3);
    box-shadow: 0 0 15px var(--neon-pink);
    transform: translateY(-2px);
}

/* Content */
.site-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Post cards */
article {
    background: var(--card-bg);
    border: 2px solid var(--neon-purple);
    border-radius: 0;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 
        0 0 20px rgba(176, 36, 255, 0.3),
        inset 0 0 20px rgba(176, 36, 255, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

article::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink), var(--neon-green), var(--neon-orange));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

article:hover::before {
    opacity: 0.5;
    animation: border-pulse 2s infinite;
}

@keyframes border-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

article:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 5px 30px rgba(176, 36, 255, 0.5),
        inset 0 0 30px rgba(176, 36, 255, 0.2);
}

/* Titoli */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.entry-title {
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.entry-title a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

.entry-title a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 15px var(--neon-pink);
}

/* Meta informazioni */
.entry-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--neon-green);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.entry-meta a {
    color: var(--neon-green);
    text-decoration: none;
}

.entry-meta a:hover {
    text-decoration: underline;
}

/* Content */
.entry-content {
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1rem;
}

.entry-content a {
    color: var(--neon-orange);
    text-decoration: none;
    border-bottom: 1px dotted var(--neon-orange);
    transition: all 0.3s ease;
}

.entry-content a:hover {
    color: var(--neon-pink);
    border-bottom-color: var(--neon-pink);
    text-shadow: 0 0 5px var(--neon-pink);
}

/* Codice */
code, pre {
    background: var(--code-bg);
    border: 1px solid var(--neon-green);
    font-family: 'Courier New', monospace;
    color: var(--neon-green);
}

code {
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

pre {
    padding: 1rem;
    overflow-x: auto;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

pre code {
    border: none;
    padding: 0;
}

/* Immagini */
img {
    max-width: 100%;
    height: auto;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.post-thumbnail {
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    transition: transform 0.3s ease;
}

.post-thumbnail:hover img {
    transform: scale(1.05);
}

/* Bottoni */
.more-link,
button,
input[type="submit"],
.wp-block-button__link {
    background: linear-gradient(135deg, var(--neon-pink) 0%, var(--neon-purple) 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font-main);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 16, 240, 0.5);
    display: inline-block;
}

.more-link:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--neon-pink);
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-pink) 100%);
}

/* Sidebar */
.widget {
    background: var(--card-bg);
    border: 2px solid var(--neon-green);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.2);
}

.widget-title {
    font-size: 1rem;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--neon-green);
    padding-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    background: var(--darker-bg);
    border-top: 3px solid var(--neon-purple);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    box-shadow: 0 0 20px var(--neon-purple);
}

.site-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Effetto pixel grid */
.pixel-grid {
    background-image: 
        linear-gradient(rgba(57, 255, 20, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57, 255, 20, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Comments */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: rgba(26, 26, 46, 0.5);
    border-left: 3px solid var(--neon-orange);
    padding: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-family: var(--font-main);
    font-size: 0.8rem;
    color: var(--neon-orange);
}

/* Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.2rem;
    }
    
    article {
        padding: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        align-items: center;
    }
}

/* Animazione di caricamento */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

article {
    animation: fadeIn 0.5s ease-out;
}

/* Easter egg: effetto matrix per il background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05;
    z-index: -1;
}
