/* ===================================
   LESSON 1 - SPECIFIC STYLES
   =================================== */

/* Lesson Navigation */
.lesson-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s;
}

body.dark-theme .lesson-nav {
    background: #2d2d2d;
}

.lesson-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-back {
    color: var(--accent-primary);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-back:hover {
    background: var(--bg-secondary);
    transform: translateX(-5px);
}

.lesson-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lesson-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.lesson-nav-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

/* Progress Bar */
.lesson-progress-bar {
    height: 4px;
    background: var(--bg-tertiary);
    position: sticky;
    top: 70px;
    z-index: 999;
}

.lesson-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s;
}

/* Lesson Hero */
.lesson-hero {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 0;
}

.lesson-hero-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.lesson-number-big {
    font-size: 8rem;
    font-weight: 900;
    opacity: 0.3;
    line-height: 1;
}

.lesson-hero-text {
    flex: 1;
}

.lesson-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.lesson-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.lesson-meta {
    display: flex;
    gap: 2rem;
    font-size: 1rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    padding: 3rem 0;
}

/* Sidebar */
.lesson-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.lesson-sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.lesson-toc {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.toc-link {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.toc-link:hover,
.toc-link.active {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    transform: translateX(5px);
}

.sidebar-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-secondary);
}

.sidebar-card h4 {
    margin-bottom: 0.5rem;
}

/* Main Content */
.lesson-main {
    max-width: 800px;
}

.content-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-primary);
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--accent-primary);
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Boxes */
.intro-box,
.explanation-box,
.warning-box,
.theory-box,
.analogy-box {
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.intro-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.intro-text {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.explanation-box {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-blue);
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

body.dark-theme .warning-box {
    background: #3d3000;
    color: #ffeb3b;
}

.theory-box {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-purple);
}

.analogy-box {
    background: #d1f2eb;
    border-left: 4px solid #00d2a0;
    color: #00714d;
}

body.dark-theme .analogy-box {
    background: #003d2d;
    color: #00ffa5;
}

/* Objectives */
.objectives-box {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.objectives-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.objectives-list li {
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
}

.objectives-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 900;
    font-size: 1.3rem;
}

/* Demo Container */
.demo-container {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

.demo-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

body.dark-theme .demo-box {
    background: #2d2d2d;
}

#demoTitle {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

#demoText {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hidden-element {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--accent-green);
    color: white;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.demo-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.demo-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-secondary {
    background: #4ecdc4;
    color: white;
}

.btn-success {
    background: #55efc4;
    color: #00614d;
}

.btn-warning {
    background: #ffeaa7;
    color: #7d6300;
}

.demo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Visual Explanation */
.visual-explanation {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 12px;
}

.dom-tree {
    font-family: var(--font-code);
    font-size: 0.9rem;
}

.dom-node {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
}

.dom-node.root {
    border-left-color: var(--accent-green);
}

.dom-children {
    margin-left: 2rem;
    border-left: 2px dashed var(--text-tertiary);
    padding-left: 1rem;
}

/* Code Examples */
.code-example {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.code-header {
    background: #2d2d2d;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-label {
    color: #888;
    font-size: 0.85rem;
    font-family: var(--font-code);
}

.copy-btn {
    background: transparent;
    border: 1px solid #555;
    color: #888;
    padding: 0.25rem 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #555;
    color: white;
}

.code-example pre {
    background: #1e1e1e;
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
}

.code-example code {
    font-family: var(--font-code);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #d4d4d4;
}

/* Comparison Box */
.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.comparison-col {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
}

.comparison-col h4 {
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

/* Try It Box */
.try-it-box {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
    border: 3px dashed var(--accent-primary);
}

.try-it-box h4 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.playground {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 1rem 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-theme .playground {
    background: #2d2d2d;
}

.testo-speciale {
    font-size: 1.3rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.test-button {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.test-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.modifiable-box {
    background: var(--bg-secondary);
    padding: 2rem 3rem;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.5s;
}

/* Code Editor */
.code-editor {
    margin: 1.5rem 0;
}

.code-input {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-code);
    font-size: 0.95rem;
    background: #1e1e1e;
    color: #d4d4d4;
    border: 2px solid #333;
    border-radius: 8px;
    resize: vertical;
    line-height: 1.6;
}

.code-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.run-btn,
.reset-btn,
.solution-btn,
.hint-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

.run-btn {
    background: var(--accent-green);
    color: white;
}

.reset-btn {
    background: var(--accent-orange);
    color: white;
}

.solution-btn {
    background: var(--accent-purple);
    color: white;
}

.hint-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.run-btn:hover,
.reset-btn:hover,
.solution-btn:hover,
.hint-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.result-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: none;
}

.result-box.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    display: block;
}

.result-box.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    display: block;
}

body.dark-theme .result-box.success {
    background: #1e4620;
    color: #5cf76c;
}

body.dark-theme .result-box.error {
    background: #461e1e;
    color: #ff6b6b;
}

/* Hints */
.hint-box {
    margin-bottom: 1rem;
}

.hint-content {
    margin-top: 0.5rem;
    padding: 1rem;
    background: #fff9e6;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
}

body.dark-theme .hint-content {
    background: #3d3000;
}

.hint-content pre {
    background: #1e1e1e;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Steps */
.steps-box {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.steps-list {
    list-style: none;
    counter-reset: step-counter;
}

.steps-list > li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
}

.steps-list > li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

/* Exercise Container */
.exercise-container {
    margin: 2rem 0;
}

.exercise-preview {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
}

#titoloEsercizio {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.exercise-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    font-size: 1.2rem;
    transition: all 0.5s;
}

body.dark-theme .exercise-box {
    background: #2d2d2d;
}

.exercise-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.exercise-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Project */
.project-intro {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

.live-project {
    margin: 2rem 0;
}

.progetto-container {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

body.dark-theme .progetto-container {
    background: #2d2d2d;
}

#progettoTitolo {
    font-size: 2rem;
    margin-bottom: 1rem;
}

#progettoMessaggio {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.colori-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.color-btn {
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: 3px solid transparent;
    border-radius: 15px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.color-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    border-color: var(--accent-primary);
}

.project-code-section {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
}

.project-code-section h4 {
    margin-bottom: 1rem;
}

/* Conclusion */
.recap-box,
.challenge-box,
.next-lesson-box,
.feedback-box {
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

.recap-box {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-green);
}

.challenge-box {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    color: white;
}

.next-lesson-box {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.feedback-box {
    background: var(--bg-secondary);
    border: 2px dashed var(--accent-purple);
}

.recap-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recap-list code {
    background: rgba(0,0,0,0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-code);
}

/* Footer */
.lesson-footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-nav {
    display: flex;
    justify-content: space-between;
}

.footer-link {
    color: var(--accent-primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.footer-link:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .lesson-sidebar {
        order: 2;
    }
    
    .lesson-main {
        order: 1;
    }
    
    .sidebar-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .lesson-title {
        font-size: 2rem;
    }
    
    .lesson-number-big {
        font-size: 4rem;
    }
    
    .colori-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comparison-box {
        grid-template-columns: 1fr;
    }
    
    .demo-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .lesson-nav .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .colori-grid {
        grid-template-columns: 1fr;
    }
}


/* ===================================
   NUOVE SEZIONI - PREPARAZIONE PROGETTO
   =================================== */

/* Concept Cards */
.concept-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 2px solid #f0f0f0;
    transition: transform 0.3s, box-shadow 0.3s;
}

body.dark-theme .concept-card {
    background: #2d2d2d;
    border-color: #3d3d3d;
}

.concept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
}

.concept-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.concept-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.concept-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.5rem;
}

body.dark-theme .concept-header h3 {
    color: #e2e8f0;
}

.concept-intro {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Players Row */
.players-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.player-card {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    color: #1e293b;
}

body.dark-theme .player-card {
    background: #3d3d3d;
    color: #e2e8f0;
}

.player-card:hover {
    transform: scale(1.1);
}

.analogy-text {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
}

body.dark-theme .analogy-text {
    color: #cbd5e0;
}

/* Step by Step */
.step-by-step {
    margin-top: 2rem;
}

.step-by-step h4 {
    color: #2d3748;
    margin-bottom: 1.5rem;
}

body.dark-theme .step-by-step h4 {
    color: #e2e8f0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.step-item {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s;
}

body.dark-theme .step-item {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
}

.step-item:hover {
    transform: translateX(5px);
}

.step-num {
    display: inline-block;
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.step-item p {
    margin: 0.5rem 0 0 0;
    color: #4a5568;
    line-height: 1.6;
}

body.dark-theme .step-item p {
    color: #cbd5e0;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0;
}

.comparison-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    position: relative;
}

body.dark-theme .comparison-card {
    background: #2d2d2d;
}

.comparison-card.old {
    border: 3px solid #cbd5e0;
}

.comparison-card.new {
    border: 3px solid #48bb78;
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
}

body.dark-theme .comparison-card.new {
    background: linear-gradient(135deg, #1e4620 0%, #2d5a3d 100%);
}

.card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
}

.comparison-card.new .card-badge {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.card-note {
    text-align: center;
    color: #718096;
    margin-top: 1rem;
    font-size: 0.95rem;
}

body.dark-theme .card-note {
    color: #cbd5e0;
}

.comparison-arrow {
    font-size: 2.5rem;
    color: #667eea;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Real Example & Translation Box */
.real-example-box {
    margin: 2rem 0;
}

.real-example-box h4 {
    color: #2d3748;
    margin-bottom: 1rem;
}

body.dark-theme .real-example-box h4 {
    color: #e2e8f0;
}

.translation-box {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

body.dark-theme .translation-box {
    background: linear-gradient(135deg, #3d1e1e 0%, #4a2020 100%);
}

.translation-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.translation-content h5 {
    color: #2d3748;
    margin: 0 0 0.5rem 0;
}

body.dark-theme .translation-content h5 {
    color: #fca5a5;
}

.translation-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #c53030;
    margin: 0.5rem 0;
}

body.dark-theme .translation-text {
    color: #fca5a5;
}

.translation-note {
    color: #718096;
    font-size: 0.95rem;
    margin: 0.5rem 0 0 0;
}

body.dark-theme .translation-note {
    color: #cbd5e0;
}

/* Comparison Detailed */
.comparison-detailed {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 15px;
}

body.dark-theme .comparison-detailed {
    background: #1e293b;
}

.comparison-detailed h4 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
}

body.dark-theme .comparison-detailed h4 {
    color: #e2e8f0;
}

.comparison-codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.code-variant {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

body.dark-theme .code-variant {
    background: #2d2d2d;
}

.code-variant h5 {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Fix per Code Variant - Codice dentro comparison-detailed */
.code-variant pre {
    background: #1e1e1e;
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0 0 0;
    overflow-x: auto;
}

.code-variant code {
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.6;
    color: #d4d4d4;
}

/* Fix per comparison-card - Codice dentro comparison-grid */
.comparison-card pre {
    background: #1e1e1e;
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0 0 0;
    overflow-x: auto;
}

.comparison-card code {
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.6;
    color: #d4d4d4;
}

body.dark-theme .code-variant h5 {
    color: #cbd5e0;
}

.comparison-note {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: #059669;
    font-weight: 600;
}

/* Tip Box */
.tip-box {
    background: linear-gradient(135deg, #fffaf0 0%, #feebc8 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    border-left: 5px solid #ed8936;
}

body.dark-theme .tip-box {
    background: linear-gradient(135deg, #3d3000 0%, #4a3a00 100%);
}

.tip-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.tip-content h4 {
    color: #2d3748;
    margin: 0 0 1rem 0;
}

body.dark-theme .tip-content h4 {
    color: #fbbf24;
}

.tip-content p {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: #4a5568;
}

body.dark-theme .tip-content p {
    color: #cbd5e0;
}

.tip-note {
    color: #718096;
    font-size: 0.95rem;
    font-style: italic;
}

body.dark-theme .tip-note {
    color: #cbd5e0;
}

/* Dataset Rules */
.dataset-rules {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1.5rem;
}

body.dark-theme .dataset-rules {
    background: #2d2d2d;
}

.dataset-rules h5 {
    color: #2d3748;
    margin-bottom: 1rem;
}

body.dark-theme .dataset-rules h5 {
    color: #e2e8f0;
}

.dataset-rules ul {
    list-style: none;
    padding: 0;
}

.dataset-rules li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #4a5568;
}

body.dark-theme .dataset-rules li {
    color: #cbd5e0;
}

.dataset-rules li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: bold;
}

/* Practical Example */
.practical-example {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 15px;
}

body.dark-theme .practical-example {
    background: linear-gradient(135deg, #3d3000 0%, #4a3a00 100%);
}

.practical-example h4 {
    color: #78350f;
    margin-bottom: 1.5rem;
}

body.dark-theme .practical-example h4 {
    color: #fbbf24;
}

/* Workflow */
.workflow-box {
    margin-top: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
}

body.dark-theme .workflow-box {
    background: #2d2d2d;
}

.workflow-box h5 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
}

body.dark-theme .workflow-box h5 {
    color: #e2e8f0;
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.workflow-step {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    min-width: 150px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

body.dark-theme .workflow-step {
    background: linear-gradient(135deg, #2d3a5a 0%, #3d4a6a 100%);
}

.workflow-step:hover {
    transform: scale(1.05);
}

.workflow-num {
    display: inline-block;
    background: #667eea;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.workflow-step p {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    color: #4a5568;
}

body.dark-theme .workflow-step p {
    color: #cbd5e0;
}

.workflow-arrow {
    font-size: 1.5rem;
    color: #667eea;
    flex-shrink: 0;
}

/* Unified Example Section */
.unified-example-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem;
    margin: 3rem 0;
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Code Breakdown */
.code-breakdown {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
}

body.dark-theme .code-breakdown {
    background: #2d2d2d;
}

.code-breakdown h4 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
}

body.dark-theme .code-breakdown h4 {
    color: #e2e8f0;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.breakdown-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
}

body.dark-theme .breakdown-item {
    background: linear-gradient(135deg, #1e4620 0%, #2d5a3d 100%);
}

.breakdown-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.breakdown-item p {
    margin: 0;
    color: #166534;
    line-height: 1.5;
}

body.dark-theme .breakdown-item p {
    color: #86efac;
}

/* Ready Box */
.ready-box {
    background: linear-gradient(135deg, #f6e05e 0%, #ecc94b 100%);
    border-radius: 20px;
    padding: 3rem;
    margin: 3rem 0;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.ready-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ready-icon {
    font-size: 3rem;
}

.ready-header h3 {
    color: #2d3748;
    font-size: 2rem;
    margin: 0;
}

.checklist-box {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
}

body.dark-theme .checklist-box {
    background: #2d2d2d;
}

.checklist-box h4 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
}

body.dark-theme .checklist-box h4 {
    color: #e2e8f0;
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.checklist-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 10px;
    transition: transform 0.3s;
}

body.dark-theme .checklist-item {
    background: #1e1e1e;
}

.checklist-item:hover {
    transform: translateX(5px);
}

.check-icon {
    background: #48bb78;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.check-content strong {
    color: #2d3748;
    display: block;
    margin-bottom: 0.3rem;
}

body.dark-theme .check-content strong {
    color: #e2e8f0;
}

.check-content p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

body.dark-theme .check-content p {
    color: #cbd5e0;
}

/* Encouragement Box */
.encouragement-box {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

body.dark-theme .encouragement-box {
    background: #2d2d2d;
}

.encouragement-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.encouragement-content {
    flex: 1;
}

.encouragement-title {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

body.dark-theme .encouragement-title {
    color: #e2e8f0;
}

.encouragement-content p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0.5rem 0;
}

body.dark-theme .encouragement-content p {
    color: #cbd5e0;
}

.encouragement-note {
    color: #718096;
    font-style: italic;
}

body.dark-theme .encouragement-note {
    color: #a0aec0;
}

/* CTA Box */
.cta-box {
    text-align: center;
    margin-top: 2rem;
}

/* Demo Elements */
.demo-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
}

body.dark-theme .demo-result {
    background: #2d2d2d;
}

.demo-paragraph {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: #f1f5f9;
    border-radius: 8px;
    transition: all 0.3s;
}

body.dark-theme .demo-paragraph {
    background: #3d3d3d;
}

.demo-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.demo-product-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    color: #1e293b;
}

body.dark-theme .demo-product-btn {
    background: #2d2d2d;
    border-color: #4a5568;
    color: #e2e8f0;
}

.demo-product-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.demo-result-text {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    min-height: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e40af;
}

body.dark-theme .demo-result-text {
    background: #2d2d2d;
    color: #60a5fa;
}

/* Responsive per Nuove Sezioni */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
    }
    
    .workflow-steps {
        flex-direction: column;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .encouragement-box,
    .translation-box,
    .tip-box {
        flex-direction: column;
        text-align: center;
    }
}