/* ==========================================
   HEADING TAG ANALYZER STYLES
========================================== */

/* Input Tabs */
.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
}

.nav-tabs .nav-link {
    color: var(--gray-color);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.nav-tabs .nav-link:hover {
    border-color: var(--primary-light);
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

/* HTML Textarea */
#htmlContent {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
}

/* Score Circle */
.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: 8px;
    background: white;
    border-radius: 50%;
}

.score-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    position: relative;
    z-index: 1;
}

.score-label {
    font-size: 1rem;
    color: var(--gray-color);
    position: relative;
    z-index: 1;
}

/* Score based colors */
.score-circle.excellent {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.score-circle.excellent .score-value {
    color: #10b981;
}

.score-circle.good {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.score-circle.good .score-value {
    color: #3b82f6;
}

.score-circle.fair {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.score-circle.fair .score-value {
    color: #f59e0b;
}

.score-circle.poor {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.score-circle.poor .score-value {
    color: #ef4444;
}

/* Score Issues */
#scoreIssues .issue-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#scoreIssues .issue-item.error {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
}

#scoreIssues .issue-item.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
}

#scoreIssues .issue-item.success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
}

#scoreIssues .issue-item i {
    font-size: 1.25rem;
}

/* Heading Statistics */
.stat-card {
    text-align: center;
    padding: 1.25rem;
    border-radius: 12px;
    transition: var(--transition);
    border: 2px solid #e5e7eb;
}

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

.stat-card .stat-label {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

/* Heading Level Colors */
.h1-stat {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.h1-stat .stat-label {
    color: #ef4444;
}

.h1-stat .stat-value {
    color: #dc2626;
}

.h2-stat {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.h2-stat .stat-label {
    color: #f59e0b;
}

.h2-stat .stat-value {
    color: #d97706;
}

.h3-stat {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.h3-stat .stat-label {
    color: #3b82f6;
}

.h3-stat .stat-value {
    color: #2563eb;
}

.h4-stat {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.h4-stat .stat-label {
    color: #10b981;
}

.h4-stat .stat-value {
    color: #059669;
}

.h5-stat {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
}

.h5-stat .stat-label {
    color: #8b5cf6;
}

.h5-stat .stat-value {
    color: #7c3aed;
}

.h6-stat {
    background: rgba(236, 72, 153, 0.1);
    border-color: #ec4899;
}

.h6-stat .stat-label {
    color: #ec4899;
}

.h6-stat .stat-value {
    color: #db2777;
}

/* Heading Tree */
.heading-tree {
    font-family: 'Courier New', monospace;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 12px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

.heading-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.heading-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.heading-item.h1 {
    border-color: #ef4444;
    margin-left: 0;
}

.heading-item.h2 {
    border-color: #f59e0b;
    margin-left: 1.5rem;
}

.heading-item.h3 {
    border-color: #3b82f6;
    margin-left: 3rem;
}

.heading-item.h4 {
    border-color: #10b981;
    margin-left: 4.5rem;
}

.heading-item.h5 {
    border-color: #8b5cf6;
    margin-left: 6rem;
}

.heading-item.h6 {
    border-color: #ec4899;
    margin-left: 7.5rem;
}

.heading-level {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    min-width: 45px;
    text-align: center;
}

.heading-level.h1 {
    background: #ef4444;
    color: white;
}

.heading-level.h2 {
    background: #f59e0b;
    color: white;
}

.heading-level.h3 {
    background: #3b82f6;
    color: white;
}

.heading-level.h4 {
    background: #10b981;
    color: white;
}

.heading-level.h5 {
    background: #8b5cf6;
    color: white;
}

.heading-level.h6 {
    background: #ec4899;
    color: white;
}

.heading-text {
    color: var(--dark-color);
    flex: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Visual Hierarchy for Heading Display */
.heading-item.h1 .heading-text {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.heading-item.h2 .heading-text {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.heading-item.h3 .heading-text {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.heading-item.h4 .heading-text {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.heading-item.h5 .heading-text {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.heading-item.h6 .heading-text {
    font-size: 0.938rem;
    font-weight: 500;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Recommendations */
.recommendation-item {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.recommendation-item.critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.recommendation-item.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.recommendation-item.info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.recommendation-item.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.recommendation-item h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommendation-item p {
    margin: 0;
    color: var(--gray-color);
}

/* Practice Cards */
.practice-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    height: 100%;
    transition: var(--transition);
    border: 2px solid transparent;
}

.practice-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.practice-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.practice-icon i {
    font-size: 1.75rem;
}

.practice-card h5 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.practice-card p {
    font-size: 0.938rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .score-circle {
        width: 120px;
        height: 120px;
    }

    .score-value {
        font-size: 2.5rem;
    }

    .heading-item.h2 {
        margin-left: 1rem;
    }

    .heading-item.h3 {
        margin-left: 2rem;
    }

    .heading-item.h4 {
        margin-left: 3rem;
    }

    .heading-item.h5 {
        margin-left: 4rem;
    }

    .heading-item.h6 {
        margin-left: 5rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#resultsSection .card {
    animation: fadeInUp 0.5s ease;
}

#resultsSection .card:nth-child(2) {
    animation-delay: 0.1s;
}

#resultsSection .card:nth-child(3) {
    animation-delay: 0.2s;
}

#resultsSection .card:nth-child(4) {
    animation-delay: 0.3s;
}