/* ===================================
   LESSON 6 - SPECIFIC STYLES
   Se Allora (If/Else Visuale)
   =================================== */

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

/* HTML Structure Box - Lesson 2 specific additions */
.html-structure-box {
    background: #e3f2fd;
    border: 3px solid #2196f3;
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

body.dark-theme .html-structure-box {
    background: #0d2d4a;
    border-color: #64b5f6;
}

.html-structure-box h3 {
    color: #1976d2;
    margin-bottom: 1rem;
}

body.dark-theme .html-structure-box h3 {
    color: #64b5f6;
}

.html-structure-box p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.id-reference {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    border-left: 4px solid #2196f3;
}

body.dark-theme .id-reference {
    background: #1a1a1a;
}

.id-reference strong {
    display: block;
    margin-bottom: 0.75rem;
    color: #1976d2;
    font-size: 1.1rem;
}

body.dark-theme .id-reference strong {
    color: #64b5f6;
}

.id-reference ul {
    list-style: none;
    padding: 0;
}

.id-reference li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-tertiary);
}

.id-reference li:last-child {
    border-bottom: none;
}

.id-reference code {
    background: #e3f2fd;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: var(--font-code);
    color: #1976d2;
    font-weight: 600;
    margin-right: 0.5rem;
}

body.dark-theme .id-reference code {
    background: #0d2d4a;
    color: #64b5f6;
}

.code-tag {
    color: #569cd6;
}

.code-attr {
    color: #9cdcfe;
}

/* Demo Container Specific */
.demo-display {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

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

/* Counter Display */
.counter-display {
    text-align: center;
    padding: 2rem;
    background: var(--gradient-primary);
    border-radius: 16px;
    color: white;
    margin-bottom: 2rem;
}

.counter-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.counter-value {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    margin: 1rem 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.counter-sublabel {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-box {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

body.dark-theme .stat-box {
    background: #1a1a1a;
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Code Peek */
.code-peek {
    background: #1e1e1e;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.code-peek h4 {
    color: #888;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.code-peek code {
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-number {
    color: #b5cea8;
}

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

.variable-visual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.var-box {
    background: white;
    border: 3px solid var(--accent-primary);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

body.dark-theme .var-box {
    background: #1a1a1a;
}

.var-box:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.var-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-family: var(--font-code);
}

.var-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-primary);
    font-family: var(--font-code);
}

/* Why Box */
.why-box {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin: 1.5rem 0;
}

.why-box h3 {
    color: white;
    margin-bottom: 1rem;
}

.why-box ol {
    padding-left: 1.5rem;
}

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

/* Comparison Table */
.comparison-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.comparison-table h4 {
    margin-bottom: 1rem;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

.comparison-table th {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
}

.comparison-table td {
    padding: 1.5rem;
    border-bottom: 1px solid var(--bg-tertiary);
}

.comparison-table code {
    display: block;
    margin: 0.5rem 0;
    font-family: var(--font-code);
    font-size: 0.9rem;
}

.comparison-table small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

/* Info Box */
.info-box {
    background: #d1f2eb;
    border-left: 4px solid #00d2a0;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

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

.info-box strong {
    display: block;
    margin-bottom: 0.5rem;
}

/* Rules Box */
.rules-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.rule-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    align-items: flex-start;
}

.rule-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.rule-item code {
    display: block;
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    font-family: var(--font-code);
}

.rule-item ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

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

.type-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s;
    border: 3px solid transparent;
}

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

.type-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.type-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

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

.code-example-small {
    background: #1e1e1e;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.code-example-small pre {
    margin: 0;
}

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

.code-boolean {
    color: #569cd6;
}

.code-null {
    color: #569cd6;
}

/* Interactive Type Checker */
.interactive-type-checker {
    margin: 2rem 0;
}

.type-checker {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.type-input {
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--bg-tertiary);
    border-radius: 8px;
    font-family: var(--font-code);
    background: white;
    color: var(--text-primary);
}

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

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

.check-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;
}

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

.type-result {
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.calc-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

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

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

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

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

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

.calc-operator {
    padding: 1rem;
    font-size: 1.1rem;
    border: 3px solid var(--bg-tertiary);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 600;
}

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

.calc-btn {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.calc-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.calc-result {
    background: var(--gradient-sunset);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 1.5rem;
}

.result-label {
    display: block;
    color: white;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    font-family: var(--font-code);
}

/* Display Box */
.display-box {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem;
    border-radius: 16px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s;
}

/* Points Display */
.points-display {
    background: var(--gradient-primary);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 2rem;
}

.points-label {
    color: white;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.points-value {
    font-size: 6rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    margin: 1rem 0;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.points-sublabel {
    color: white;
    font-size: 1rem;
    opacity: 0.8;
}

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

/* Project Styles */
.project-display {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.main-counter {
    background: var(--gradient-primary);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 2rem;
}

.counter-big-value {
    font-size: 7rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    text-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transition: all 0.5s;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

body.dark-theme .stat-card {
    background: #1a1a1a;
}

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

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-primary);
    font-family: var(--font-code);
}

.project-controls-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.project-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);
}

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

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

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

/* Key Concepts */
.key-concepts-box {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

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

.concept-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-primary);
    transition: all 0.3s;
}

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

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

.concept-card h4 {
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.concept-card code {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-code);
}

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

    .calc-inputs {
        grid-template-columns: 1fr;
    }

    .calc-operator {
        text-align: center;
    }

    .counter-value {
        font-size: 3.5rem;
    }

    .counter-big-value {
        font-size: 4rem;
    }

    .points-value {
        font-size: 4rem;
    }

    .project-controls-grid {
        grid-template-columns: 1fr;
    }

    .types-grid {
        grid-template-columns: 1fr;
    }

    .key-concepts-grid {
        grid-template-columns: 1fr;
    }

    .variable-visual {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .project-stats {
        grid-template-columns: 1fr 1fr;
    }
}
/* ===================================
   LEZIONE 6 - ADDITIONAL STYLES
   =================================== */

/* Age Checker Demo */
.age-checker {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

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

.age-result {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.age-result.minor {
    background: #ff7675;
    color: white;
}

.age-result.adult {
    background: #55efc4;
    color: white;
}

.age-result.senior {
    background: #a29bfe;
    color: white;
}

/* Comparison Table */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.comparison-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

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

.comparison-operator {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.comparison-name {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.comparison-example {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Quiz Styles */
.quiz-container {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

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

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

.quiz-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.quiz-question {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    text-align: center;
}

.quiz-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-option {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 3px solid transparent;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
}

.quiz-option.selected {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: white;
}

.quiz-option.correct {
    border-color: #55efc4;
    background: #55efc4;
    color: white;
}

.quiz-option.wrong {
    border-color: #ff7675;
    background: #ff7675;
    color: white;
}

.quiz-feedback {
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.quiz-feedback.correct {
    background: #d4edda;
    color: #155724;
}

.quiz-feedback.wrong {
    background: #f8d7da;
    color: #721c24;
}

body.dark-theme .quiz-feedback.correct {
    background: #1e4620;
    color: #5cf76c;
}

body.dark-theme .quiz-feedback.wrong {
    background: #461e1e;
    color: #ff6b6b;
}

.quiz-score {
    text-align: center;
    padding: 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    margin-top: 2rem;
}

.quiz-score-value {
    font-size: 4rem;
    font-weight: 900;
    margin: 1rem 0;
}

/* Traffic Light Exercise */
.traffic-light-demo {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

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

.traffic-light {
    width: 150px;
    margin: 2rem auto;
    padding: 2rem 1rem;
    background: #2d3436;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.traffic-light-bulb {
    width: 100px;
    height: 100px;
    margin: 1rem auto;
    border-radius: 50%;
    background: #636e72;
    transition: all 0.3s;
}

.traffic-light-bulb.red {
    background: #ff7675;
    box-shadow: 0 0 30px #ff7675;
}

.traffic-light-bulb.yellow {
    background: #ffeaa7;
    box-shadow: 0 0 30px #ffeaa7;
}

.traffic-light-bulb.green {
    background: #55efc4;
    box-shadow: 0 0 30px #55efc4;
}

.traffic-message {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 8px;
}

.traffic-message.red {
    background: #ff7675;
    color: white;
}

.traffic-message.yellow {
    background: #feca57;
    color: #2d3436;
}

.traffic-message.green {
    background: #55efc4;
    color: white;
}

/* Logic Flow Diagram */
.logic-diagram {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.logic-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--accent-primary);
}

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

.logic-condition {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

body.dark-theme .logic-condition {
    background: #1e3a5f;
}

.logic-action {
    background: #f3e5f5;
    border-left-color: #9c27b0;
}

body.dark-theme .logic-action {
    background: #3d1e42;
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-question {
        font-size: 1.2rem;
    }
    
    .quiz-option {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}
