:root {
    --bs-primary: #0d6efd;
    --bs-primary-rgb: 13, 110, 253;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --transition: all 0.3s ease;
}

/* Dark theme variables */
[data-bs-theme="dark"] {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #e9ecef;
    --bs-card-bg: #2d2d2d;
    --bs-border-color: #404040;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    transition: var(--transition);
    background-color: #f8f9fa; /* Light gray background for better readability */
}
 .lead.text-white-50 {
    font-size: 1.25rem;
    color: rgba(255,255,255,.5);
    margin-bottom: 3rem;
  }

/* Dark theme body background */
[data-bs-theme="dark"] body {
    background-color: #1a1d23; /* Darker background for dark theme */
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero Section */
.hero-section,
.hero-section.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: 40vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: white;
}

/* Dark theme hero section */
[data-bs-theme="dark"] .hero-section,
[data-bs-theme="dark"] .hero-section.bg-gradient {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(0,0,0,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

/* Dark theme pattern */
[data-bs-theme="dark"] .hero-section::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Ensure text colors work properly in hero section */
.hero-section .text-white,
.hero-section h1,
.hero-section p {
    color: white !important;
}

.hero-section .text-white-50 {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Hero section animations */
.hero-section h1 {
    animation: fadeInUp 0.8s ease-out;
}

.hero-section p {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Feature Icons */
.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: var(--transition);
    margin: 0 auto;
    text-align: center;
}

.feature-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 1;
}

.card:hover .feature-icon {
    transform: translateY(-5px);
}

/* Cards */
.card {
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Form Controls */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

/* Theme-aware navigation */
[data-theme-nav] {
    background: var(--bs-primary) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Light theme navigation */
[data-bs-theme="light"] [data-theme-nav] {
    background: var(--bs-primary) !important;
    color: white;
}

[data-bs-theme="light"] [data-theme-nav] .navbar-brand {
    color: white !important;
}

[data-bs-theme="light"] [data-theme-nav] .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

[data-bs-theme="light"] [data-theme-nav] .nav-link:hover,
[data-bs-theme="light"] [data-theme-nav] .nav-link.active {
    color: white !important;
}

[data-bs-theme="light"] [data-theme-nav] .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="light"] [data-theme-nav] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-bs-theme="light"] [data-theme-nav] .dropdown-menu {
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

[data-bs-theme="light"] [data-theme-nav] .dropdown-item {
    color: #212529;
}

[data-bs-theme="light"] [data-theme-nav] .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

/* Dark theme navigation */
[data-bs-theme="dark"] [data-theme-nav] {
    background: #1a1d23 !important;
    color: #e9ecef;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] [data-theme-nav] .navbar-brand {
    color: #e9ecef !important;
}

[data-bs-theme="dark"] [data-theme-nav] .nav-link {
    color: rgba(233, 236, 239, 0.75) !important;
}

[data-bs-theme="dark"] [data-theme-nav] .nav-link:hover,
[data-bs-theme="dark"] [data-theme-nav] .nav-link.active {
    color: #e9ecef !important;
}

[data-bs-theme="dark"] [data-theme-nav] .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] [data-theme-nav] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28233, 236, 239, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-bs-theme="dark"] [data-theme-nav] .dropdown-menu {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] [data-theme-nav] .dropdown-item {
    color: #e9ecef;
}

[data-bs-theme="dark"] [data-theme-nav] .dropdown-item:hover {
    background-color: #4a5568;
    color: #e9ecef;
}

/* Theme toggle button styles */
[data-bs-theme="light"] [data-theme-nav] #themeToggle {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.85);
}

[data-bs-theme="light"] [data-theme-nav] #themeToggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

[data-bs-theme="dark"] [data-theme-nav] #themeToggle {
    border-color: rgba(233, 236, 239, 0.25);
    color: rgba(233, 236, 239, 0.75);
}

[data-bs-theme="dark"] [data-theme-nav] #themeToggle:hover {
    background-color: rgba(233, 236, 239, 0.1);
    border-color: rgba(233, 236, 239, 0.5);
    color: #e9ecef;
}

.navbar-brand {
    font-size: 1.5rem;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* Theme Toggle */
#themeToggle {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

#themeToggle:hover {
    transform: rotate(180deg);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bars */
.progress {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* SERP Preview Styles */
.serp-preview-container {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem 0;
}

[data-bs-theme="dark"] .serp-preview-container {
    background: #2d2d2d;
}

.serp-preview {
    width: 100%;
    max-width: none;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: arial, sans-serif;
    margin-bottom: 1rem;
}

[data-bs-theme="dark"] .serp-preview {
    background: #1a1a1a;
    border: 1px solid #404040;
}

.serp-url {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}

[data-bs-theme="dark"] .serp-url {
    color: #9aa0a6;
}

.serp-domain {
    font-weight: 400;
}

.serp-breadcrumb {
    margin-left: 4px;
}

.serp-title {
    margin-bottom: 4px;
}

.serp-title a {
    color: #1a0dab;
    text-decoration: none;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 400;
    display: block;
}

[data-bs-theme="dark"] .serp-title a {
    color: #8ab4f8;
}

.serp-title a:hover {
    text-decoration: underline;
}

.serp-description {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.58;
    margin-bottom: 8px;
}

[data-bs-theme="dark"] .serp-description {
    color: #bdc1c6;
}

        .serp-extras {
            font-size: 12px;
            color: #5f6368;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .serp-favicon {
            display: inline-flex;
            align-items: center;
            margin-right: 6px;
        }
        
        .favicon-img {
            width: 16px;
            height: 16px;
            border-radius: 2px;
            object-fit: contain;
            flex-shrink: 0;
        }
        
        .favicon-fallback {
            width: 16px;
            height: 16px;
            font-size: 12px;
            color: #5f6368;
            display: inline-block;
            text-align: center;
            line-height: 16px;
        }

[data-bs-theme="dark"] .serp-extras {
    color: #9aa0a6;
}

.serp-security {
    color: #34a853;
    font-size: 12px;
}

.serp-date {
    color: #5f6368;
}

[data-bs-theme="dark"] .serp-date {
    color: #9aa0a6;
}

/* SERP Analysis Cards */
.serp-analysis-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e9ecef;
}

[data-bs-theme="dark"] .serp-analysis-card {
    background: #2d2d2d;
    border-color: #404040;
}

.serp-analysis-card h6 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #495057;
}

[data-bs-theme="dark"] .serp-analysis-card h6 {
    color: #e9ecef;
}

.serp-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

[data-bs-theme="dark"] .metric-label {
    color: #adb5bd;
}

.metric-value {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Progress bar improvements */
.serp-analysis-card .progress {
    height: 6px;
    background-color: #e9ecef;
    margin-bottom: 0.5rem;
}

[data-bs-theme="dark"] .serp-analysis-card .progress {
    background-color: #495057;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .serp-preview {
        padding: 12px;
    }
    
    .serp-title a {
        font-size: 18px;
    }
    
    .serp-description {
        font-size: 13px;
    }
}

/* Animation for SERP preview */
.serp-preview {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.progress {
    border-radius: var(--border-radius);
    height: 8px;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Security Score Progress Bar - Enhanced for better text visibility */
.report-content .progress {
    height: 14px;
    background-color: #e5e7eb;
    border: 1px solid #d1d5db;
}

/* Trust by Numbers Section */
#trust-numbers {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#trust-numbers h2,
#trust-numbers h3,
#trust-numbers h6 {
    color: white;
}

#trust-numbers .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

#trust-numbers .stat-icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#trust-numbers .stat-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#trust-numbers .col-md-3 {
    transition: transform 0.3s ease;
}

#trust-numbers .col-md-3:hover {
    transform: scale(1.05);
}

/* Dark theme adjustments for trust numbers */
[data-bs-theme="dark"] #trust-numbers {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

[data-bs-theme="dark"] #trust-numbers .stat-icon {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] #trust-numbers .stat-icon:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* Speed Optimizations Section */
.optimization-recommendation {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #007bff;
}

[data-bs-theme="dark"] .optimization-recommendation {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    border-left-color: #3182ce;
}

.optimization-recommendation small {
    color: #007bff;
}

[data-bs-theme="dark"] .optimization-recommendation small {
    color: #63b3ed;
}

/* Speed optimization cards */
.card .status-badge.info {
    background-color: #17a2b8;
    color: white;
}

.card .status-badge.warning {
    background-color: #ffc107;
    color: #212529;
}

.card .status-badge.pass {
    background-color: #28a745;
    color: white;
}

/* Hover effects for optimization cards */
.card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

/* Performance metrics enhancement */
.report-content .h4 {
    font-weight: 700;
    color: #495057;
}

[data-bs-theme="dark"] .report-content .h4 {
    color: #e2e8f0;
}

/* Optimization Summary */
.bg-light {
    background-color: #f8f9fa !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2d3748 !important;
}

/* Speed optimization progress bar */
.progress {
    background-color: #e9ecef;
}

[data-bs-theme="dark"] .progress {
    background-color: #4a5568;
}

.report-content .progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    min-width: 2rem;
    padding: 0 0.5rem;
}

/* Dark theme adjustments */
[data-bs-theme="dark"] .report-content .progress {
    background-color: #374151;
    border-color: #4b5563;
}

[data-bs-theme="dark"] .report-content .progress-bar {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Ensure percentage is visible even with very low scores */
.report-content .progress-bar[style*="width: 0%"],
.report-content .progress-bar[style*="width: 0.0%"] {
    min-width: 3rem;
    background-color: #6b7280 !important;
    color: white;
    font-weight: 700;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-sm);
}

/* SEO Score Visualization */
.seo-score-container {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.seo-score-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #4ade80 0deg, #4ade80 var(--score-angle, 0deg), #374151 var(--score-angle, 0deg));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
}

.score-value {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
}

/* Metric Cards */
.metric-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.metric-icon {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.metric-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: auto;
    font-weight: 500;
}

/* Ensure consistent grid alignment */
.row.g-3 > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.row.g-3 > [class*="col-"] > .metric-card {
    flex: 1;
}

/* Specific styling for bottom row metric cards */
.row.g-3.mt-3 .metric-card {
    min-height: 140px;
    padding: 1.25rem;
}

.row.g-3.mt-3 .metric-card .metric-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.row.g-3.mt-3 .metric-card .metric-value {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.row.g-3.mt-3 .metric-card .metric-label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .row.g-3 > [class*="col-"] {
        margin-bottom: 1rem;
    }
    
    .metric-card {
        min-height: 100px;
        padding: 0.75rem;
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
    
    .metric-label {
        font-size: 0.8rem;
    }
}

@media (min-width: 992px) {
    .row.g-3 > [class*="col-"] {
        margin-bottom: 0;
    }
    
    .metric-card {
        min-height: 130px;
    }
}

/* Report Sections */
.report-section {
    margin-bottom: 2rem;
    background: var(--bs-card-bg);
    border-radius: var(--border-radius);
    overflow: visible;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    height: auto !important;
}

.report-header {
    padding: 1rem 1.5rem;
    background: var(--bs-light);
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Dark theme heading background and text contrast */
[data-bs-theme="dark"] .report-header {
    background: #2b2f36; /* dark surface */
    color: #e9ecef; /* ensure text visible */
}

[data-bs-theme="dark"] .report-header .status-badge {
    filter: none; /* keep badge colors readable */
}

.report-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
}

/* Status Indicators */
.status-pass {
    color: #22c55e;
}

.status-warning {
    color: #f59e0b;
}

.status-fail {
    color: #ef4444;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: none; /* Keep PHP-provided casing like ucfirst($status) */
    letter-spacing: 0.5px;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.status-badge.pass {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.warning {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.fail {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Dark theme status badges */
[data-bs-theme="dark"] .status-badge.pass {
    background-color: #166534;
    color: #dcfce7;
}

[data-bs-theme="dark"] .status-badge.warning {
    background-color: #92400e;
    color: #fef3c7;
}

[data-bs-theme="dark"] .status-badge.fail {
    background-color: #991b1b;
    color: #fee2e2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-circle::before {
        width: 90px;
        height: 90px;
    }
    
    .score-value {
        font-size: 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .hero-section,
    #themeToggle,
    .btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid currentColor;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}


/* Enhanced Status Indicators for SEO Score Container */
.seo-score-container .text-success {
    color: rgba(255, 255, 255, 0.95) !important;
    /*text-shadow: 0 0 8px rgba(0, 255, 136, 0.8);*/
    font-weight: 600;
}

.seo-score-container .text-warning {
    color: rgba(255, 255, 255, 0.95) !important;
    /*text-shadow: 0 0 8px rgba(255, 193, 7, 0.8);*/
    font-weight: 600;
}

.seo-score-container .text-danger {
    color: rgba(255, 255, 255, 0.95) !important;
    /*text-shadow: 0 0 8px rgba(255, 68, 68, 0.8);*/
    font-weight: 600;
}

/* Enhanced Icons with better visibility */
.seo-score-container .bi-check-circle-fill {
    color: #00ff88 !important;
    filter: drop-shadow(0 0 6px rgba(0, 255, 136, 0.7));
    font-size: 1.1em;
}

.seo-score-container .bi-exclamation-triangle-fill {
    color: #ffc107 !important;
    filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.7));
    font-size: 1.1em;
}

.seo-score-container .bi-x-circle-fill {
    color: #ff4444 !important;
    filter: drop-shadow(0 0 6px rgba(255, 68, 68, 0.7));
    font-size: 1.1em;
}

/* Status indicator labels with better contrast */
.seo-score-container small {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Ensure proper spacing and alignment */
.seo-score-container .h4 {
    margin-bottom: 0.25rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* Dark theme adjustments for status indicators */
[data-bs-theme="dark"] .seo-score-container .text-success,
[data-bs-theme="dark"] .seo-score-container .text-warning,
[data-bs-theme="dark"] .seo-score-container .text-danger {
    color: rgba(255, 255, 255, 0.95) !important;
}

[data-bs-theme="dark"] .seo-score-container small {
    color: rgba(255, 255, 255, 0.85) !important;
}


/* Enhanced Metric Card Animations */
.metric-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.metric-card.metric-complete {
    animation: metricBounce 0.6s ease-in-out;
}

@keyframes metricBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.05); }
}

/* Enhanced Counter Animations */
.counter-complete {
    animation: counterPulse 0.8s ease-in-out;
}

@keyframes counterPulse {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1.05); }
    75% { transform: scale(1.08); }
}

/* Smooth transitions for metric values */
.metric-value {
    transition: all 0.2s ease;
    font-weight: 700;
}

/* Enhanced status indicators */
.seo-score-container .h4 {
    transition: all 0.3s ease;
}

/* Loading state for metric cards */
.metric-card[style*="opacity: 0"] {
    pointer-events: none;
}

/* Improved hover effects for animated elements */
.metric-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Progress animation for metric cards */
.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--bs-primary), transparent);
    transform: translateX(-100%);
    transition: transform 1.5s ease;
}

.metric-card.animating::before {
    transform: translateX(100%);
}

/* Responsive animation adjustments */
@media (max-width: 768px) {
    .metric-card.metric-complete {
        animation-duration: 0.4s;
    }
    
    .counter-complete {
        animation-duration: 0.6s;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .metric-card,
    .metric-card.metric-complete,
    .counter-complete,
    .seo-score-container .h4 {
        animation: none !important;
        transition: none !important;
    }
    
    .metric-card::before {
        display: none;
    }
}



/* 2D Score Visualization Styles */
.score-2d-visualization {
    position: relative;
    display: block; /* Ensure visible for 2D preference */
    width: 220px;
    height: 220px;
    margin: 0 auto;
    
}
.score-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.8rem;
    font-weight: 700;
    color: #00ff88; /* match excellent/good tone */
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* SVG Ring Progress */
.ring-progress {
    position: absolute;
    inset: 0;
}

.ring-track {
    fill: none;
    stroke: rgba(255,255,255,0.22);
    stroke-width: 18;
}

.ring-progress-circle {
    fill: none;
    stroke: url(#ringGradient);
    stroke-width: 18;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-dasharray: 0;
    stroke-dashoffset: 0;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.25));
    z-index: 1;
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-progress.glow .ring-progress-circle {
    animation: ringGlow 2s ease-in-out infinite alternate;
}

@keyframes ringGlow {
    0% { filter: drop-shadow(0 0 6px rgba(255,255,255,0.2)); }
    100% { filter: drop-shadow(0 0 16px rgba(255,255,255,0.45)); }
}

.score-2d-visualization canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.score-percentage {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.6rem;
    font-weight: 800;
    color: #2d2d2d;
    z-index: 2;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
    display: block !important;
}

.score-label {
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.95rem;
    color: #4a5568;
    font-weight: 500;
    letter-spacing: 0.2px;
    z-index: 2;
    display: block !important;
}

.score-embed-btn {
    position: absolute;
    top: 78%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 4px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
    background: #fff;
    color: #2d3748;
    border: 1px solid #cbd5e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.score-embed-btn:hover {
    background: #f7fafc;
}

/* Score Information Overlay Animations */
.score-info-overlay {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.score-info-overlay.animated {
    opacity: 1;
    transform: translateY(0);
}

.score-grade {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: scoreGradeGlow 2s ease-in-out infinite alternate;
}

.score-grade.excellent {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.score-grade.good {
    background: linear-gradient(135deg, #88ff00, #6acc00);
    color: white;
    box-shadow: 0 4px 15px rgba(136, 255, 0, 0.3);
}

.score-grade.average {
    background: linear-gradient(135deg, #ffaa00, #cc8800);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.3);
}

.score-grade.poor {
    background: linear-gradient(135deg, #ff4444, #cc3333);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

@keyframes scoreGradeGlow {
    0% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
    100% { box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4); }
}

.score-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0;
    font-weight: 500;
}

/* Metric Cards Enhanced Animation */
.metric-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
}

.metric-card.animated {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--bs-primary), transparent);
    transition: left 1.5s ease;
}

.metric-card.loading::before {
    left: 100%;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.metric-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--bs-primary);
}

/* Status Counters Animation */
.seo-score-container .h4 {
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s ease;
}

.seo-score-container .h4.animated {
    opacity: 1;
    transform: scale(1);
}

/* Dark theme adjustments */
[data-bs-theme="dark"] .score-percentage {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .score-label {
    color: #cbd5e0;
}

[data-bs-theme="dark"] .score-embed-btn {
    background: #1f2937;
    color: #e2e8f0;
    border-color: #374151;
}

[data-bs-theme="dark"] .score-label {
    color: #adb5bd;
}

[data-bs-theme="dark"] .score-description {
    color: #adb5bd;
}

[data-bs-theme="dark"] .metric-card {
    background: linear-gradient(135deg, #343a40, #495057);
    border-color: #495057;
    color: #fff;
}

[data-bs-theme="dark"] .metric-label {
    color: #adb5bd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .score-2d-visualization {
        width: 220px;
        height: 220px;
    }
    
    .score-percentage {
        font-size: 2.4rem;
        top: 42%;
    }
    .score-label { top: 58%; font-size: 0.9rem; }
    .score-embed-btn { top: 78%; font-size: 0.85rem; }
    
    .metric-card {
        padding: 1rem 0.5rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
}

/* Animation delays for staggered effect */
.metric-card:nth-child(1) { animation-delay: 0.1s; }
.metric-card:nth-child(2) { animation-delay: 0.2s; }
.metric-card:nth-child(3) { animation-delay: 0.3s; }
.metric-card:nth-child(4) { animation-delay: 0.4s; }
.metric-card:nth-child(5) { animation-delay: 0.5s; }
.metric-card:nth-child(6) { animation-delay: 0.6s; }



/* Form Alignment and Button Improvements */
.seo-analysis-form .row {
    align-items: end;
}

.seo-analysis-form .form-control-lg {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.seo-analysis-form .form-control-lg:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.seo-analysis-form .btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.seo-analysis-form .btn-primary {
    background: linear-gradient(135deg, var(--bs-primary), #0056b3);
    border: none;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.seo-analysis-form .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, var(--bs-primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.seo-analysis-form .btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
}

.seo-analysis-form .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: translateY(-1px);
}

/* Button group alignment */
.seo-analysis-form .d-flex {
    height: 100%;
    align-items: stretch;
}

.seo-analysis-form .flex-grow-1 {
    min-height: 48px;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .seo-analysis-form .col-12:first-child {
        margin-bottom: 1rem;
    }
    
    .seo-analysis-form .d-flex {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .seo-analysis-form .btn {
        width: 100%;
    }
    
    .seo-analysis-form .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .seo-analysis-form .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
    }
}

/* Enhanced form validation styles */
.seo-analysis-form .form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 1.38 1.38'/%3e%3c/svg%3e");
}

.seo-analysis-form .form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4'/%3e%3cpath d='m7.2 4.6-1.4 1.4'/%3e%3c/svg%3e");
}

/* Loading state for analyze button */
.seo-analysis-form .btn-primary.loading {
    position: relative;
    color: transparent;
}

.seo-analysis-form .btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Form card enhancements */
.seo-analysis-form .card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .seo-analysis-form .card {
    background: rgba(33, 37, 41, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* URL validation indicators */
.url-validation-indicators {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.validation-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.validation-indicator.valid {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    opacity: 1;
}

.validation-indicator.invalid {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    opacity: 1;
}

/* AI-Powered SEO Recommendations Styles */
.ai-recommendations {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #dee2e6;
}

.ai-recommendations h6 {
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.ai-recommendations .card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 15px;
}

.ai-recommendations .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ai-recommendations .card-header {
    border-bottom: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.ai-recommendations .display-4 {
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.ai-recommendations .list-unstyled li {
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.ai-recommendations .list-unstyled li:last-child {
    border-bottom: none;
}

.ai-recommendations .list-unstyled li:hover {
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 5px;
    padding-left: 10px;
}

.ai-recommendations .bi {
    font-size: 1.1rem;
}

.ai-recommendations .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
}

/* Responsive adjustments for AI recommendations */
@media (max-width: 768px) {
    .ai-recommendations {
        padding: 15px;
    }
    
    .ai-recommendations .display-4 {
        font-size: 2.5rem;
    }
    
    .ai-recommendations .card-body {
        padding: 15px;
    }
}

/* Dark theme support for AI recommendations */
[data-bs-theme="dark"] .ai-recommendations {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border-color: #6c757d;
}

[data-bs-theme="dark"] .ai-recommendations h6 {
    color: #e9ecef;
    border-bottom-color: #0d6efd;
}

[data-bs-theme="dark"] .ai-recommendations .list-unstyled li {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .ai-recommendations .list-unstyled li:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* SVG Ring Animation Styles */
.ring-progress {
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3));
    transition: filter 0.3s ease;
}

.ring-progress.glow {
    filter: drop-shadow(0 0 15px rgba(0, 255, 136, 0.5));
}

.ring-track {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 8;
}

[data-bs-theme="dark"] .ring-track {
    stroke: #495057;
}

.ring-progress-circle {
    fill: none;
    stroke: url(#ringGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ring color variations based on score */
.ring-progress-circle.ring-excellent {
    stroke: #28a745;
    filter: drop-shadow(0 0 10px rgba(40, 167, 69, 0.6));
}

.ring-progress-circle.ring-good {
    stroke: #20c997;
    filter: drop-shadow(0 0 10px rgba(32, 201, 151, 0.6));
}

.ring-progress-circle.ring-average {
    stroke: #ffc107;
    filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.6));
}

.ring-progress-circle.ring-poor {
    stroke: #dc3545;
    filter: drop-shadow(0 0 10px rgba(220, 53, 69, 0.6));
}

/* Score text positioning and styling */
.score-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

[data-bs-theme="dark"] .score-percentage {
    color: #e9ecef;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Page Header Mobile Responsiveness */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header-content {
    flex: 1;
    min-width: 0; /* Allows text to wrap/truncate */
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.url-link {
    word-break: break-all;
    color: inherit;
    text-decoration: none;
}

.url-link:hover {
    text-decoration: underline;
}

/* Mobile-specific adjustments */
@media (max-width: 767.98px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .page-header-content {
        width: 100%;
        text-align: left;
    }
    
    .page-header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .page-header-actions .btn {
        flex: 1;
        min-width: 140px;
        max-width: 200px;
    }
    
    .page-header-actions form {
        flex: 1;
        min-width: 140px;
        max-width: 200px;
    }
    
    .page-header-actions form .btn {
        width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 575.98px) {
    .page-header {
        gap: 1rem;
    }
    
    .page-header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .page-header-actions .btn,
    .page-header-actions form {
        width: 100%;
        max-width: none;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .url-link {
        font-size: 0.9rem;
    }
}

/* Score Breakdown Table Mobile Responsiveness */
.score-breakdown-container {
    margin-top: 1rem;
}

.score-breakdown-table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.score-breakdown-table th {
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
    background: rgba(13, 110, 253, 0.1);
}

.score-breakdown-table td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

.score-breakdown-table .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    white-space: nowrap;
}

.score-breakdown-table .score-value {
    font-weight: 700;
    font-size: 1rem;
    min-width: 3rem;
    display: inline-block;
    text-align: center;
}

/* Mobile-specific adjustments for score breakdown */
@media (max-width: 767.98px) {
    .score-breakdown-table {
        font-size: 0.8rem;
    }
    
    .score-breakdown-table th,
    .score-breakdown-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .score-breakdown-table th:first-child,
    .score-breakdown-table td:first-child {
        padding-left: 0.5rem;
        min-width: 120px;
    }
    
    .score-breakdown-table th:last-child,
    .score-breakdown-table td:last-child {
        padding-right: 0.5rem;
        text-align: center;
    }
    
    .score-breakdown-table .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
    
    .score-breakdown-table .score-value {
        font-size: 0.9rem;
        min-width: 2.5rem;
    }
}

/* Extra small screens */
@media (max-width: 575.98px) {
    .score-breakdown-table {
        font-size: 0.75rem;
    }
    
    .score-breakdown-table th,
    .score-breakdown-table td {
        padding: 0.4rem 0.2rem;
    }
    
    .score-breakdown-table th:first-child,
    .score-breakdown-table td:first-child {
        min-width: 100px;
        font-size: 0.7rem;
    }
    
    .score-breakdown-table .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.35rem;
    }
    
    .score-breakdown-table .score-value {
        font-size: 0.8rem;
        min-width: 2rem;
    }
    
    /* Stack table headers on very small screens */
    .table-responsive {
        border: none;
    }
}

/* Dark theme adjustments for score breakdown table */
[data-bs-theme="dark"] .score-breakdown-table th {
    background: rgba(13, 110, 253, 0.2);
    color: #e9ecef;
}

[data-bs-theme="dark"] .score-breakdown-table td {
    border-bottom-color: #495057;
    color: #e9ecef;
}

[data-bs-theme="dark"] .score-breakdown-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Collapse button responsiveness */
@media (max-width: 575.98px) {
    .btn[data-bs-toggle="collapse"] {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        width: 100%;
        text-align: center;
    }
    
    .btn[data-bs-toggle="collapse"] i {
        margin-right: 0.5rem;
    }
}

.score-label {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    pointer-events: none;
}

[data-bs-theme="dark"] .score-label {
    color: #adb5bd;
}

/* 2D Score Visualization Container */
.score-2d-visualization {
    position: relative;
    display: inline-block;
    width: 220px;
    height: 220px;
}

/* Ring animation keyframes */
@keyframes ring-glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.7));
    }
}

.ring-progress.animate-glow {
    animation: ring-glow 2s ease-in-out infinite;
}

/* Responsive adjustments for ring visualization */
@media (max-width: 768px) {
    .score-2d-visualization {
        width: 180px;
        height: 180px;
    }
    
    .ring-progress {
        width: 180px !important;
        height: 180px !important;
    }
    
    .score-percentage {
        font-size: 2rem;
    }
    
    .score-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .score-2d-visualization {
        width: 150px;
        height: 150px;
    }
    
    .ring-progress {
        width: 150px !important;
        height: 150px !important;
    }
    
    .score-percentage {
        font-size: 1.5rem;
    }
    
    .score-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .score-2d-visualization {
        width: 140px;
        height: 140px;
    }
    
    .ring-progress {
        width: 140px !important;
        height: 140px !important;
    }
    
    .score-percentage {
        font-size: 1.3rem;
    }
    
    .score-label {
        font-size: 0.65rem;
    }
    
    .ring-track,
    .ring-progress-circle {
        stroke-width: 6 !important;
    }
}

/* Ensure SVG ring scales properly */
.ring-progress {
    width: 100%;
    height: 100%;
    max-width: 220px;
    max-height: 220px;
}

/* Fix for mobile viewport scaling */
.score-2d-visualization {
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
}

/* Mobile optimizations for score container */
@media (max-width: 768px) {
    .seo-score-container {
        padding: 1.5rem 1rem;
    }
    
    .seo-score-container .col-md-4 {
        margin-bottom: 1.5rem;
    }
    
    .score-3d-container {
        max-width: 180px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .seo-score-container {
        padding: 1rem 0.75rem;
    }
    
    .score-3d-container {
        max-width: 150px;
        margin: 0 auto;
    }
    
    .seo-score-container .col-md-8 .row.g-3 {
        margin: 0 -0.25rem;
    }
    
    .seo-score-container .col-md-8 .row.g-3 > [class*="col-"] {
        padding: 0 0.25rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .score-3d-container {
        max-width: 140px;
        margin: 0 auto;
    }
    
    .score-info-overlay {
        position: static;
        transform: none;
        margin-top: 1rem;
        padding: 0.75rem 1rem;
    }
}

