/* ===================================
   LESSON 3 - SPECIFIC STYLES
   Giocare con i Numeri
   =================================== */

/* Importing base lesson styles */
@import url('../lezione-01/style.css');

/* Math Playground */
.math-playground {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.playground-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

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

.playground-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

/* Random Number Display */
.random-display {
    text-align: center;
}

.random-number {
    font-size: 5rem;
    font-weight: 900;
    font-family: var(--font-code);
    color: var(--gradient-primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 2rem 0;
    line-height: 1;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rounding Demo */
.rounding-demo {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.math-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.5rem;
    text-align: center;
    border: 3px solid var(--bg-tertiary);
    border-radius: 12px;
    font-weight: 700;
    font-family: var(--font-code);
    box-sizing: border-box;
}

body.dark-theme .math-input {
    background: #1a1a1a;
    border-color: #3d3d3d;
    color: white;
}

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

.rounding-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.result-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.dark-theme .result-item {
    background: #1a1a1a;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.result-label {
    display: block;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.result-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-primary);
    font-family: var(--font-code);
    margin: 0.5rem 0;
}

.result-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* Power Demo */
.power-demo {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.power-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.power-symbol {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.calc-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.calc-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.power-result {
    background: var(--gradient-sunset);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.power-result span {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    font-family: var(--font-code);
}

/* Operators Grid */
.operators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.operator-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s;
    border: 3px solid transparent;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.operator-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.operator-symbol {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-code);
}

.operator-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.operator-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Precedence Box */
.precedence-box {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

.precedence-box h3 {
    color: #2d3436;
    margin-bottom: 1rem;
}

.precedence-box ol {
    color: #2d3436;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.precedence-box li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.precedence-examples {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
}

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

.example-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--bg-tertiary);
    flex-wrap: wrap;
}

.example-row:last-child {
    border-bottom: none;
}

.example-row code {
    font-family: var(--font-code);
    font-size: 1.1rem;
    font-weight: 600;
}

.arrow {
    color: var(--accent-primary);
    font-weight: 900;
}

.example-row strong {
    color: var(--accent-green);
    font-size: 1.2rem;
}

.note {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* Quiz Container */
.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

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

.quiz-question code {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-code);
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    text-align: center;
    min-height: 60px;
}

body.dark-theme .quiz-question code {
    background: #1a1a1a;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.quiz-btn {
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--bg-primary);
    border: 3px solid var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-code);
    min-height: 60px;
}

.quiz-btn:hover {
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.quiz-btn.correct {
    background: #d4edda !important;
    border-color: #28a745 !important;
    color: #155724 !important;
}

.quiz-btn.wrong {
    background: #f8d7da !important;
    border-color: #dc3545 !important;
    color: #721c24 !important;
}

body.dark-theme .quiz-btn.correct {
    background: #1e4620 !important;
    border-color: #28a745 !important;
    color: #5cf76c !important;
}

body.dark-theme .quiz-btn.wrong {
    background: #461e1e !important;
    border-color: #dc3545 !important;
    color: #ff6b6b !important;
}

.quiz-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
    font-size: 1rem !important;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-result.show {
    display: flex;
}

.quiz-result.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.quiz-result.wrong {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

/* Math Methods Grid */
.math-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.math-method-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-primary);
    transition: all 0.3s;
    min-height: 220px;
}

.math-method-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.math-method-card h3 {
    font-family: var(--font-code);
    font-size: 1.2rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.method-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.method-usage {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bg-tertiary);
}

.method-usage strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Practical Examples */
.practical-examples {
    margin: 2rem 0;
}

.example-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.example-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

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

.try-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.example-result {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    font-family: var(--font-code);
    font-weight: 600;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-theme .example-result {
    background: #1a1a1a;
}

/* Conversion Methods */
.conversion-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    min-height: 200px;
}

.conversion-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.conversion-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.conversion-card h4 {
    font-family: var(--font-code);
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.conversion-card p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* NaN Box */
.nan-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

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

/* Interactive Converter */
.interactive-converter {
    margin: 2rem 0;
}

.converter-box {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
}

.converter-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 3px solid var(--bg-tertiary);
    border-radius: 8px;
    font-family: var(--font-code);
    margin-bottom: 1rem;
    box-sizing: border-box;
}

body.dark-theme .converter-input {
    background: #1a1a1a;
    border-color: #3d3d3d;
    color: white;
}

.convert-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.conversion-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.conv-result {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    align-items: center;
    min-height: 60px;
}

body.dark-theme .conv-result {
    background: #1a1a1a;
}

.conv-label {
    font-weight: 600;
    min-width: 120px;
}

.conv-value {
    font-family: var(--font-code);
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Precision Problem */
.precision-problem {
    background: #fee;
    border-left: 4px solid #dc3545;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

body.dark-theme .precision-problem {
    background: #3d0000;
}

/* Rounding Techniques */
.rounding-techniques {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.technique-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    min-height: 220px;
}

.technique-card h4 {
    font-family: var(--font-code);
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* Mini Calculator (Exercise) */
.mini-calc {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    max-width: 400px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
}

.calc-display {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 2rem;
    font-weight: 900;
    text-align: right;
    font-family: var(--font-code);
    margin-bottom: 1.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.calc-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calc-input {
    padding: 1rem;
    font-size: 1.2rem;
    text-align: center;
    border: 3px solid var(--bg-tertiary);
    border-radius: 8px;
    font-weight: 700;
    font-family: var(--font-code);
    width: 100%;
    box-sizing: border-box;
}

body.dark-theme .calc-input {
    background: #1a1a1a;
    border-color: #3d3d3d;
    color: white;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    width: 100%;
}

.calc-op-btn {
    padding: 1.2rem 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    background: white;
    border: 3px solid var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-code);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    width: 100%;
    box-sizing: border-box;
}

body.dark-theme .calc-op-btn {
    background: #1a1a1a;
    border-color: #3d3d3d;
    color: white;
}

.calc-op-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

/* Full Calculator (Project) */
.calculator-app {
    max-width: 350px;
    margin: 0 auto 2rem;
    background: #2d2d2d;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    box-sizing: border-box;
    overflow: hidden;
}

.calc-screen {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calc-history {
    color: #888;
    font-size: 0.85rem;
    text-align: right;
    margin-bottom: 0.5rem;
    min-height: 18px;
    font-family: var(--font-code);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calculator-app .calc-display {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    text-align: right;
    font-family: var(--font-code);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: transparent;
    padding: 0;
    margin: 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.calc-keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    width: 100%;
}

.calc-key {
    aspect-ratio: 1;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-code);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 0;
}

.calc-key:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.calc-key:active {
    transform: scale(0.95);
}

.calc-key.num {
    background: #505050;
    color: white;
}

.calc-key.operator {
    background: #ff9500;
    color: white;
}

.calc-key.key-function {
    background: #d4d4d2;
    color: #1c1c1c;
}

.calc-key.key-equals {
    background: #34c759;
    color: white;
}

.calc-key.key-zero {
    grid-column: span 2;
    border-radius: 50px;
    justify-content: flex-start;
    padding-left: 1.8rem;
    aspect-ratio: 2 / 1;
}

/* Reminder Box */
.reminder-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 234, 167, 0.2);
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.reminder-box p {
    font-size: 1rem !important;
    color: var(--text-primary);
    margin: 0;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .rounding-results {
        grid-template-columns: 1fr;
    }

    .power-input-group {
        flex-direction: column;
    }

    .operators-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quiz-options {
        grid-template-columns: 1fr;
    }

    .math-methods-grid {
        grid-template-columns: 1fr;
    }

    .conversion-methods {
        grid-template-columns: 1fr;
    }
    
    .calc-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .calc-inputs {
        grid-template-columns: 1fr;
    }
    
    .mastery-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-app {
        padding: 1rem;
    }
    
    .calc-key {
        min-height: 50px;
        font-size: 1rem;
    }
    
    .calc-key.key-zero {
        padding-left: 1.2rem;
    }
    
    .conversion-card {
        min-height: 150px;
    }
    
    .operator-card {
        min-height: 180px;
    }
}

/* FIX URGENTE PER QUIZ */
.quiz-question {
    position: relative; /* Importante per i selettori */
    margin-bottom: 2rem;
}

.quiz-options {
    margin: 1rem 0;
}

.quiz-btn {
    cursor: pointer;
}

.quiz-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* FIX URGENTE PER CONVERSION CARDS */
.conversion-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.conversion-card {
    border: 2px solid #e0e0e0;
    padding: 1rem;
    border-radius: 8px;
    background: white;
}

body.dark-theme .conversion-card {
    background: #2d2d2d;
    border-color: #444;
}

/* FIX URGENTE PER MINI CALCOLATRICE */
.mini-calc {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.calc-op-btn {
    min-height: 50px;
    font-size: 1.2rem;
}

/* FIX URGENTE PER CALCOLATRICE LIVE */
.calculator-app {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.calc-keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.calc-key {
    min-height: 60px;
}


/* ============================================
   CSS PER SEZIONE ESERCIZI SCARICABILI
   Aggiungi questo CSS al file style.css della lezione
   ============================================ */

/* Download Intro */
.download-intro {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-primary);
    margin-bottom: 2rem;
}

.download-intro p {
    margin-bottom: 0.75rem;
    color: #1e293b;  
    line-height: 1.6;
}
.download-intro strong {
    color: #6366f1;  
    font-weight: 700;
}

.download-intro p:last-child {
    margin-bottom: 0;
}

/* Download Box Main */
.download-box-main {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    text-align: center;
    margin: 2rem 0;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.download-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

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

.download-box-main h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.download-box-main > p {
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.btn-download-big {
    display: inline-block;
    background: white;
    color: var(--accent-primary);
    padding: 1.25rem 3rem;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-download-big:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.download-note {
    margin-top: 1rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.download-note code {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Exercises Grid */
.exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.exercise-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.exercise-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-primary);
    opacity: 0.2;
}

.exercise-difficulty {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.difficulty-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.difficulty-badge.easy {
    background: #d1fae5;
    color: #065f46;
}

.difficulty-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.difficulty-badge.hard {
    background: #fee2e2;
    color: #991b1b;
}

.time-badge {
    font-size: 0.85rem;
    color: #64748b;
}

.exercise-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.exercise-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.exercise-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    color: var(--text-secondary);
}

/* Instructions Download */
.instructions-download {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.instructions-download h3 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

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

.download-steps li {
    counter-increment: step-counter;
    position: relative;
    padding: 1rem 1rem 1rem 3.5rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--accent-primary);
}

.download-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.download-steps li strong {
    color: var(--accent-primary);
}

.download-steps code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #1e293b;
}

/* What's Included */
.whats-included {
    margin: 2rem 0;
}

.whats-included h3 {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

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

.included-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.included-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.included-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

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

/* Pro Tips */
.pro-tips-download {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.pro-tips-download h3 {
    color: #92400e;
    margin-bottom: 1.5rem;
}

.tip-box {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #f59e0b;
}

.tip-box:last-child {
    margin-bottom: 0;
}

.tip-box strong {
    display: block;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.tip-box p {
    color: #78716c;
    font-size: 0.95rem;
}

.tip-box kbd {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 0 #cbd5e1;
}

.tip-box code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #1e293b;
}

/* CTA Download */
.cta-download {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 3rem 2rem;
    border-radius: 16px;
    text-align: center;
    margin: 2rem 0;
    border: 2px solid var(--accent-primary);
}

.cta-download h3 {
    color: var(--accent-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.cta-download > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-download-cta {
    display: inline-block;
    background: var(--accent-primary);
    color: white;
    padding: 1.25rem 3rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-download-cta:hover {
    background: var(--accent-secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.cta-note {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .exercises-grid {
        grid-template-columns: 1fr;
    }
    
    .included-grid {
        grid-template-columns: 1fr;
    }
    
    .download-box-main {
        padding: 2rem 1.5rem;
    }
    
    .download-box-main h3 {
        font-size: 1.5rem;
    }
    
    .btn-download-big,
    .btn-download-cta {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .download-steps li {
        padding: 1rem 1rem 1rem 3rem;
    }
}


/* Banner Esercizi Scaricabili */
.exercise-banner {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.banner-icon {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

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

.banner-text {
    flex: 1;
    min-width: 250px;
}

.banner-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.banner-content p {
    opacity: 0.95;
    margin: 0;
}

.banner-link {
    display: inline-block;
    background: white;
    color: var(--accent-primary);
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.banner-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .banner-content h3 {
        font-size: 1.3rem;
    }
    
    .banner-link {
        width: 100%;
    }
}