.tool-page {
    padding: 60px 0 80px;
}

.tool-page .container {
    max-width: 900px;
}

.tool-intro {
    text-align: center;
    margin-bottom: 48px;
}

.tool-intro .tool-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    display: block;
}

.tool-intro h1 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.tool-intro p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}


.quiz-progress {
    margin-bottom: 40px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
}

.progress-track {
    height: 8px;
    background: var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 20px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}


.question-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 40px;
    animation: fadeSlideUp 0.5s ease;
    box-shadow: 0 8px 30px rgba(15, 43, 70, 0.06);
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-number {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 12px;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.6;
    margin-bottom: 28px;
}


.answer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
}

.answer-option:hover {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 4%, transparent);
    transform: translateX(4px);
}

body.rtl .answer-option:hover {
    transform: translateX(-4px);
}

.answer-option.selected {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.answer-option .option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 900;
    background: var(--border-color);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.answer-option.selected .option-letter {
    background: var(--primary);
    color: white;
}


.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    gap: 16px;
}

.quiz-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.3s ease;
}

.quiz-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.quiz-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 43, 70, 0.25);
}

.quiz-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.quiz-btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}

.quiz-btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}


.results-container {
    animation: fadeSlideUp 0.6s ease;
}

.results-header {
    text-align: center;
    padding: 48px 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    color: white;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.results-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.results-score {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
}

.results-label {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.result-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 24px;
}

.result-card h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-bar-track {
    height: 10px;
    background: var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 8px;
}

.result-bar-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-bar-fill.excellent {
    background: linear-gradient(90deg, #10b981, #059669);
}

.result-bar-fill.good {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.result-bar-fill.average {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.result-bar-fill.poor {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.result-score-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: end;
}


.radar-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
    text-align: center;
    margin-bottom: 32px;
}

.radar-container h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 800;
}

.radar-container canvas {
    max-width: 400px;
    margin: 0 auto;
}


.calc-form {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 40px;
    margin-bottom: 32px;
}

.calc-form h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

select.form-control {
    cursor: pointer;
}


.calc-result {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 6%, transparent), color-mix(in srgb, var(--secondary) 4%, transparent));
    border: 2px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    margin-top: 24px;
    animation: fadeSlideUp 0.5s ease;
}

.calc-result-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    margin-bottom: 8px;
}

.calc-result-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}


.breakdown-table {
    width: 100%;
    margin-top: 24px;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.breakdown-table td {
    padding: 12px 16px;
    border: none;
    font-size: 0.9rem;
    background: var(--bg-card);
    font-weight: 600;
}

.breakdown-table td:first-child {
    border-radius: 8px 0 0 8px;
    color: var(--text-muted);
}

.breakdown-table td:last-child {
    border-radius: 0 8px 8px 0;
    text-align: end;
    font-weight: 800;
}

body.rtl .breakdown-table td:first-child {
    border-radius: 0 8px 8px 0;
}

body.rtl .breakdown-table td:last-child {
    border-radius: 8px 0 0 8px;
}

.breakdown-table tr.total td {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 800;
    font-size: 1rem;
}


.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    position: relative;
}

.wizard-step .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-color);
    font-size: 0.75rem;
    font-weight: 900;
    transition: all 0.3s ease;
}

.wizard-step.active {
    color: var(--primary);
}

.wizard-step.active .step-num {
    background: var(--primary);
    color: white;
}

.wizard-step.completed .step-num {
    background: var(--secondary);
    color: white;
}

.wizard-step:not(:last-child)::after {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--border-color);
    margin-inline-start: 8px;
}

.wizard-step.completed:not(:last-child)::after {
    background: var(--secondary);
}


.generated-output {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
}

.generated-output h2 {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 16px;
}

.output-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.output-actions .quiz-btn i {
    margin-inline-end: 6px;
}


.share-section {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.share-section p {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.share-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.twitter:hover {
    background: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

.share-btn.linkedin:hover {
    background: #0A66C2;
    color: white;
    border-color: #0A66C2;
}

.share-btn.whatsapp:hover {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.share-btn.copy:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}


.interactive-tools-section {
    margin-bottom: 56px;
}

.interactive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.interactive-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 28px 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    color: var(--text-primary) !important;
    display: block;
}

.interactive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.interactive-card:hover::before {
    opacity: 1;
}

.interactive-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(15, 43, 70, 0.12);
    border-color: transparent;
}

.interactive-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.interactive-card .card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, transparent), color-mix(in srgb, var(--accent) 5%, transparent));
    color: var(--accent);
    margin-bottom: 14px;
}

.interactive-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.interactive-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.interactive-card .card-cta {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.interactive-card .card-cta i {
    transition: transform 0.3s ease;
}

.interactive-card:hover .card-cta i {
    transform: translateX(4px);
}

body.rtl .interactive-card:hover .card-cta i {
    transform: translateX(-4px);
}


.recommendation-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.recommendation-card .rec-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    background: color-mix(in srgb, var(--secondary) 10%, transparent);
}

.recommendation-card h4 {
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.recommendation-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}


@media (max-width: 768px) {
    .tool-page .container {
        padding: 0 20px;
    }

    .question-card {
        padding: 28px 20px;
    }

    .results-header {
        padding: 36px 24px;
    }

    .results-score {
        font-size: 3.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .wizard-steps {
        flex-wrap: wrap;
    }

    .wizard-step:not(:last-child)::after {
        display: none;
    }

    .calc-form {
        padding: 28px 20px;
    }

    .calc-result-number {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .tool-intro h1 {
        font-size: 1.5rem;
    }

    .quiz-nav {
        flex-direction: column;
    }

    .quiz-btn {
        width: 100%;
        justify-content: center;
    }

    .output-actions {
        flex-direction: column;
    }
}

/* Dark Mode Fixes */
[data-theme="dark"] .interactive-card .card-cta {
    color: var(--accent) !important;
}