/* ===================================
   LESSON 7 - SPECIFIC STYLES
   Confronti e Controlli
   =================================== */

/* 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 7 - ADDITIONAL STYLES
   =================================== */

/* Password Strength Meter */
.password-strength-meter {
    margin-top: 1rem;
}

.strength-bar-container {
    width: 100%;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s;
    border-radius: 5px;
}

.strength-bar.weak {
    width: 33%;
    background: #ff7675;
}

.strength-bar.medium {
    width: 66%;
    background: #feca57;
}

.strength-bar.strong {
    width: 100%;
    background: #55efc4;
}

.strength-text {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.strength-text.weak {
    color: #ff7675;
}

.strength-text.medium {
    color: #feca57;
}

.strength-text.strong {
    color: #55efc4;
}

/* Password Requirements */
.password-requirements {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.requirement-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #dfe6e9;
    transition: all 0.3s;
}

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

.requirement-item.met {
    border-left-color: #55efc4;
    background: #d4edda;
}

body.dark-theme .requirement-item.met {
    background: #1e4620;
}

.requirement-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    min-width: 30px;
}

.requirement-text {
    flex: 1;
    font-weight: 600;
}

/* Validation Demo */
.validation-demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.validation-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

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

.validation-card h4 {
    margin-top: 0;
    color: var(--accent-primary);
}

.validation-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--bg-tertiary);
    border-radius: 8px;
    font-size: 1rem;
    margin: 1rem 0;
    transition: all 0.3s;
}

body.dark-theme .validation-input {
    background: #1a1a1a;
    color: white;
}

.validation-input.valid {
    border-color: #55efc4;
    background: #d4edda;
}

.validation-input.invalid {
    border-color: #ff7675;
    background: #f8d7da;
}

body.dark-theme .validation-input.valid {
    background: #1e4620;
}

body.dark-theme .validation-input.invalid {
    background: #461e1e;
}

.validation-feedback {
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.validation-feedback.valid {
    background: #d4edda;
    color: #155724;
}

.validation-feedback.invalid {
    background: #f8d7da;
    color: #721c24;
}

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

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

/* Comparison Examples */
.comparison-examples {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.comparison-example {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

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

.comparison-value {
    font-family: var(--font-code);
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

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

.comparison-result {
    text-align: center;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-left: 2rem;
}

.comparison-result.true {
    background: #55efc4;
    color: white;
}

.comparison-result.false {
    background: #ff7675;
    color: white;
}

/* Password Validator Project */
.password-validator-container {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

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

.password-input-group {
    position: relative;
    margin: 1.5rem 0;
}

.password-input-group input {
    width: 100%;
    padding: 1rem;
    padding-right: 3rem;
    border: 2px solid var(--bg-tertiary);
    border-radius: 8px;
    font-size: 1rem;
}

body.dark-theme .password-input-group input {
    background: #1a1a1a;
    color: white;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

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

.password-info-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.password-info-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-primary);
}

.password-info-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Logical Operators Demo */
.logic-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.logic-table th,
.logic-table td {
    padding: 1rem;
    border: 1px solid var(--bg-tertiary);
    text-align: center;
}

.logic-table th {
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
}

.logic-table td {
    background: white;
}

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

.logic-table .true-cell {
    background: #d4edda;
    color: #155724;
    font-weight: 700;
}

.logic-table .false-cell {
    background: #f8d7da;
    color: #721c24;
    font-weight: 700;
}

body.dark-theme .logic-table .true-cell {
    background: #1e4620;
    color: #5cf76c;
}

body.dark-theme .logic-table .false-cell {
    background: #461e1e;
    color: #ff6b6b;
}

/* Responsive */
@media (max-width: 768px) {
    .validation-demo-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-example {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .comparison-operator {
        padding: 1rem 0;
    }
    
    .comparison-result {
        margin-left: 0;
    }
    
    .password-info-grid {
        grid-template-columns: 1fr;
    }
}
