/* Speed Test Banner Styles — simplified, readable hero */

.speed-banner-modern {
    position: relative;
    background:
        radial-gradient(ellipse 90% 55% at 50% -10%, rgba(139, 92, 246, 0.2), transparent 52%),
        linear-gradient(168deg, #0a0418 0%, #15082f 42%, #1e0f4a 58%, #12081f 100%);
    color: #f8fafc;
    padding: calc(var(--hostcry-header-height, 72px) + 40px) 0 2.75rem;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #eb2b63, #8b5cf6, #eb2b63) 1;
    overflow: hidden;
}

.speed-banner-modern::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(5, 2, 12, 0.45), transparent);
    pointer-events: none;
    z-index: 1;
}

.banner-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 18% 72%, rgba(235, 43, 99, 0.1) 0%, transparent 46%),
        radial-gradient(circle at 82% 24%, rgba(139, 92, 246, 0.12) 0%, transparent 48%);
    pointer-events: none;
}

.speed-banner-inner {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* Banner copy + form */
.banner-content {
    padding: 0.5rem 0 1rem;
}

.speed-kicker {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.75);
}

.banner-title {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 4vw + 0.5rem, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.banner-lead {
    margin: 0 auto 1.75rem;
    max-width: 34rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.82);
}

.speed-test-form {
    margin-bottom: 1.75rem;
    text-align: left;
}

.speed-input-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.2);
}

.speed-input-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    color: #64748b;
    flex-shrink: 0;
}

.speed-url-input {
    /* Use width flex-basis only: in a column flex container, basis 200px becomes *height* and blows up on mobile */
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 0.55rem 0.65rem;
    font-size: 1rem;
    line-height: 1.35;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
}

.speed-url-input::placeholder {
    color: #94a3b8;
}

.btn-speed-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.35rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #eb2b63 0%, #b91c5c 100%);
    box-shadow: 0 4px 14px rgba(235, 43, 99, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    flex-shrink: 0;
}

.btn-speed-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(235, 43, 99, 0.42);
}

.btn-speed-primary:active {
    transform: translateY(0);
}

.btn-speed-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: none;
}

.btn-speed-primary i {
    font-size: 0.85rem;
    opacity: 0.95;
}

.form-help {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(226, 232, 240, 0.72);
    text-align: center;
}

.form-help code {
    font-size: 0.8em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.speed-banner-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1.25rem;
    font-size: 0.875rem;
    color: rgba(248, 250, 252, 0.88);
}

.speed-banner-points li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.speed-banner-points i {
    color: #34d399;
    font-size: 0.75rem;
}

/* Light trust strip under hero */
.speed-trust-strip {
    background: #f1f5f9;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: 1.25rem 0;
}

.speed-trust-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2.5rem;
    text-align: center;
}

.speed-trust-stat {
    min-width: 140px;
}

.speed-trust-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.speed-trust-label {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

@media (max-width: 768px) {
    .speed-banner-modern {
        padding-bottom: 2rem;
    }

    .speed-input-row {
        flex-direction: column;
        align-items: stretch;
        padding: 0.4rem;
        gap: 0.5rem;
    }

    .speed-input-prefix {
        display: none;
    }

    .speed-url-input {
        flex: 0 0 auto;
        width: 100%;
        min-height: 0;
        padding: 0.5rem 0.65rem;
        font-size: 16px; /* avoids iOS zoom on focus; keeps tap target without extra empty height */
        line-height: 1.3;
    }

    .btn-speed-primary {
        width: 100%;
        padding: 0.6rem 1rem;
    }

    .speed-test-form {
        text-align: center;
    }

    .form-help {
        text-align: center;
    }

    .speed-banner-points {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .banner-title {
        font-size: 1.65rem;
    }

    .banner-lead {
        font-size: 0.95rem;
    }
}

/* Speed Test Visual */
.speed-test-visual {
    padding: 1rem 0;
}

.speed-dashboard-preview {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    max-width: 100%;
}

.speed-dashboard-preview .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.speed-dashboard-preview .dashboard-header h4 {
    margin: 0;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.speed-dashboard-preview .performance-preview {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.speed-dashboard-preview .score-circle-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.speed-dashboard-preview .score-display {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#28a745 0deg 342deg, #e9ecef 342deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.speed-dashboard-preview .score-display::before {
    content: '';
    position: absolute;
    width: 65px;
    height: 65px;
    background: white;
    border-radius: 50%;
}

.speed-dashboard-preview .score-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    text-align: center;
}

.speed-dashboard-preview .score-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.speed-dashboard-preview .score-label {
    font-size: 0.7rem;
    color: #666;
    line-height: 1;
    margin-left: 2px;
}

.speed-dashboard-preview .score-grade {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.speed-dashboard-preview .metrics-preview {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.speed-dashboard-preview .metric-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.speed-dashboard-preview .metric-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.speed-dashboard-preview .metric-info {
    flex: 1;
    min-width: 0;
}

.speed-dashboard-preview .metric-label {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 0.1rem;
    line-height: 1;
}

.speed-dashboard-preview .metric-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    line-height: 1;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dashboard-header h3 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #28a745;
    font-weight: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Performance Preview */
.performance-preview {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.score-circle-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.score-display {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(#28a745 0deg 342deg, #e9ecef 342deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.score-display::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
}

.score-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    text-align: center;
}

.score-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.score-label {
    font-size: 0.8rem;
    color: #666;
    line-height: 1;
    margin-left: 2px;
}

.score-grade {
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metrics-preview {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.metric-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.metric-info {
    flex: 1;
}

.metric-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Optimization Preview */
.optimization-preview h4 {
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.optimization-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.optimization-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
}

.optimization-item i {
    font-size: 1rem;
}

.optimization-item span {
    font-size: 0.9rem;
    color: #333;
}

/* Speed Features Grid */
.speed-features-grid {
    padding: 2rem 0;
}

.speed-feature-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: all 0.3s ease;
}

.speed-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.feature-icon.performance {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.feature-icon.optimization {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.feature-icon.scoring {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.feature-icon.recommendations {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.feature-header h3 {
    margin: 0;
    color: #333;
    font-weight: 600;
    font-size: 1.3rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #555;
    font-size: 0.95rem;
}

.feature-list i {
    color: #28a745;
    font-size: 0.9rem;
}

/* Advanced Features */
.advanced-features {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

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

.section-header h3 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

.advanced-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.advanced-feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.feature-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.feature-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Performance Benchmarks */
.performance-benchmarks {
    margin-top: 3rem;
}

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

.benchmark-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid;
    transition: all 0.3s ease;
}

.benchmark-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.benchmark-item.excellent {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
}

.benchmark-item.good {
    background: rgba(23, 162, 184, 0.1);
    border-color: #17a2b8;
}

.benchmark-item.average {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
}

.benchmark-item.poor {
    background: rgba(255, 152, 0, 0.1);
    border-color: #ff9800;
}

.benchmark-item.critical {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
}

.benchmark-score {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.benchmark-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.benchmark-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.excellent .benchmark-score,
.excellent .benchmark-label {
    color: #28a745;
}

.good .benchmark-score,
.good .benchmark-label {
    color: #17a2b8;
}

.average .benchmark-score,
.average .benchmark-label {
    color: #ffc107;
}

.poor .benchmark-score,
.poor .benchmark-label {
    color: #ff9800;
}

.critical .benchmark-score,
.critical .benchmark-label {
    color: #dc3545;
}

/* Speed Test Loading Section */
.speed-loading-section {
    padding: 4rem 0;
    background: #f8fafc;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.loading-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.loading-animation {
    margin-bottom: 3rem;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-progress {
    max-width: 400px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

.loading-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.step-item.active {
    opacity: 1;
}

.step-item.completed {
    opacity: 1;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.step-item.active .step-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    animation: pulse-step 2s infinite;
}

.step-item.completed .step-icon {
    background: #10b981;
    color: white;
}

@keyframes pulse-step {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

.step-text {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

.step-item.active .step-text {
    color: #1e293b;
    font-weight: 600;
}

/* Speed Test Results Section */
.speed-results-section {
    padding: 4rem 0;
    background: #f8fafc;
    min-height: 100vh;
}

.results-header {
    text-align: center;
    margin-bottom: 3rem;
}

.results-header h2 {
    color: #1e293b;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.test-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 1rem;
}

/* Overall Score Card */
.overall-score-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(#10b981 0deg 270deg, #e5e7eb 270deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

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

.score-circle .score-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    text-align: center;
}

.score-circle span {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.score-circle small {
    font-size: 1rem;
    color: #64748b;
    margin-left: 0.25rem;
    line-height: 1;
}

.grade-display {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
}

.score-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-item .label {
    min-width: 150px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.score-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
    background: linear-gradient(90deg, #10b981, #059669);
}

.score-fill.good {
    background: linear-gradient(90deg, #10b981, #059669);
}

.score-fill.average {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.score-fill.poor {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.score-item .value {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

/* Result Cards */
.result-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.result-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.card-header-modern {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title i {
    font-size: 1.25rem;
    color: #667eea;
}

.card-title h3 {
    margin: 0;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.2rem;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-status.completed {
    color: #10b981;
}

.card-status.analyzing {
    color: #f59e0b;
}

.status-indicator i {
    font-size: 1rem;
}

.card-content-modern {
    padding: 2rem;
}

/* Performance Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.metric-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.metric-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

/* Resource Analysis */
.resource-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.resource-item:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.analysis-advantage-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

.analysis-advantage-badge i {
    margin-right: 4px;
    font-size: 0.7rem;
}

.analysis-advantage-text {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
}

.analysis-advantage-text strong {
    color: #1e40af;
}

.resource-description {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 4px;
    font-style: italic;
}

/* Tab Layout Styles */
.results-tabs-container {
    margin-top: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tab-navigation {
    display: flex;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    min-width: 180px;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #64748b;
    border-bottom: 3px solid transparent;
    position: relative;
}

.tab-btn:hover {
    background: rgba(59, 130, 246, 0.05);
    color: #3b82f6;
}

.tab-btn.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-content {
    padding: 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Summary Tab Specific Styles */
.summary-stats-card .summary-metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-metric {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.summary-metric:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-metric .metric-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.summary-metric .metric-info {
    flex: 1;
}

.summary-metric .metric-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.summary-metric .metric-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.top-issues-card .top-issues-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.top-issue-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 0 6px 6px 0;
    transition: all 0.3s ease;
}

.top-issue-item:hover {
    background: #fee2e2;
    transform: translateX(4px);
}

.top-issue-item.warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.top-issue-item.warning:hover {
    background: #fef3c7;
}

.top-issue-item .issue-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-size: 0.9rem;
}

.top-issue-item.warning .issue-icon {
    color: #f59e0b;
}

.top-issue-item .issue-text {
    flex: 1;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.4;
}

.top-issue-item .issue-severity {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    background: #ef4444;
    color: white;
}

.top-issue-item.warning .issue-severity {
    background: #f59e0b;
}

.no-issues {
    text-align: center;
    padding: 2rem;
    color: #10b981;
}

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

.no-issues p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: #374151;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #urlInput {
        width: 100%;
    }
    .tab-btn {
        min-width: 140px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .tab-btn span {
        display: none;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .summary-metric {
        padding: 0.75rem;
    }
    
    .summary-metric .metric-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .summary-metric .metric-value {
        font-size: 1.1rem;
    }
}

/* Core Web Vitals Styles */
.vitals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.vital-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.vital-item:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vital-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.vital-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.vital-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    background: #10b981;
    color: white;
}

.vital-status.needs-improvement {
    background: #f59e0b;
}

.vital-status.poor {
    background: #ef4444;
}

/* Waterfall Chart Styles */
.waterfall-chart {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.waterfall-header {
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.waterfall-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.waterfall-timeline {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fafafa;
}

.waterfall-resources {
    max-height: 400px;
    overflow-y: auto;
}

.waterfall-resource {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.waterfall-resource:hover {
    background: #f8fafc;
}

.resource-name {
    flex: 1;
    font-size: 0.9rem;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.resource-bar-container {
    flex: 2;
    height: 20px;
    background: #f1f5f9;
    border-radius: 4px;
    position: relative;
    margin: 0 1rem;
}

.resource-bar {
    height: 100%;
    border-radius: 4px;
    position: relative;
}

.resource-timing {
    font-size: 0.8rem;
    color: #64748b;
    min-width: 60px;
    text-align: right;
}

/* Recommendations Loading Styles */
.recommendations-loading {
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.recommendation-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.recommendation-content {
    flex: 1;
}

.recommendation-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.recommendation-description {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.recommendation-impact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.impact-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    background: #10b981;
    color: white;
}

.impact-badge.medium {
    background: #f59e0b;
}

.impact-badge.low {
    background: #64748b;
}

/* Responsive Optimization Recommendations */
@media (max-width: 768px) {
    .recommendation-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .recommendation-icon {
        margin-bottom: 1rem;
        align-self: center;
    }
    
    .recommendation-content {
        text-align: left;
    }
    
    .recommendation-title {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 0.75rem;
    }
    
    .recommendation-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .recommendation-impact {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .impact-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .recommendation-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .recommendation-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .recommendation-title {
        font-size: 0.95rem;
    }
    
    .recommendation-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

/* Results Actions Spacing */
.results-actions {
    margin-top: 2rem;
    margin-bottom: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid #e2e8f0;
}

/* Benefits Section Styles */
.benefits-section {
    background: #f8fafc !important;
}

.benefits-content h3 {
    color: #1e293b;
    font-weight: 600;
    font-size: 2rem;
}

.benefits-content .lead {
    color: #475569;
    font-size: 1.1rem;
    line-height: 1.6;
}

.benefit-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3b82f6;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.5rem;
    max-width: 150px;
}

.performance-impact-chart {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.chart-header h4 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.impact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.impact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.impact-content h5 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.impact-content p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

.benefit-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.benefit-card h4 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 600;
}

.benefit-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.benefit-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefit-features li {
    color: #475569;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.benefit-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h3 {
    color: #1e293b;
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: #64748b;
    font-size: 1.1rem;
}

.advantage-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.advantage-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.advantage-content h4 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 600;
}

.advantage-content p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.cta-section {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.cta-section h3 {
    color: #1e293b;
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section .lead {
    color: #64748b;
    font-size: 1.1rem;
}

.cta-section .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cta-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Responsive Design for Benefits Section */
@media (max-width: 768px) {
    .benefit-stats {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .impact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .advantage-item {
        flex-direction: column;
        text-align: center;
    }
    
    .benefits-content h3 {
        font-size: 1.5rem;
    }
    
    .section-header h3 {
        font-size: 1.5rem;
    }
    
    .cta-section {
        padding: 2rem 1rem;
    }
    
    .cta-section h3 {
        font-size: 1.5rem;
    }
}

.resource-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.resource-info {
    flex: 1;
}

.resource-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.resource-stats {
    font-size: 0.9rem;
    color: #64748b;
}

.resource-size {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

/* Waterfall Chart */
.waterfall-chart {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.waterfall-row {
    display: grid;
    grid-template-columns: 200px 1fr 80px 60px;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.waterfall-row:last-child {
    border-bottom: none;
}

.resource-name {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-timeline {
    position: relative;
    height: 20px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}

.resource-bar {
    position: absolute;
    height: 100%;
    border-radius: 10px;
    top: 0;
}

.resource-bar.document {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.resource-bar.stylesheet {
    background: linear-gradient(90deg, #10b981, #059669);
}

.resource-bar.script {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.resource-bar.image {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.resource-status {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.status-200 {
    color: #10b981;
}

.status-404 {
    color: #ef4444;
}

/* Recommendations */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.recommendation-item {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.recommendation-item.priority-high {
    border-left: 4px solid #ef4444;
}

.recommendation-item.priority-medium {
    border-left: 4px solid #f59e0b;
}

.recommendation-item.priority-low {
    border-left: 4px solid #10b981;
}

.rec-header {
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.rec-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rec-title i {
    color: #f59e0b;
    font-size: 1.1rem;
}

.rec-title h4 {
    margin: 0;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.1rem;
}

.rec-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-high .rec-priority {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.priority-medium .rec-priority {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.priority-low .rec-priority {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.rec-content {
    padding: 1.5rem 2rem;
}

.rec-description {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.rec-impact {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #64748b;
}

.impact-label,
.effort-label {
    font-weight: 600;
    color: #374151;
}

.rec-actions h5 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.rec-actions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rec-actions li {
    padding: 0.5rem 0;
    color: #374151;
    position: relative;
    padding-left: 1.5rem;
}

.rec-actions li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: 600;
}

/* Action Buttons */
.results-actions {
    text-align: center;
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.results-actions .btn {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.results-actions .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.results-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.results-actions .btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.results-actions .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 114, 128, 0.3);
}

.results-actions .btn-outline-secondary {
    background: transparent;
    color: #6b7280;
    border: 2px solid #6b7280;
}

.results-actions .btn-outline-secondary:hover {
    background: #6b7280;
    color: white;
    transform: translateY(-2px);
}

/* Speed Visualization Styles */
.visualization-card-modern {
    border-left: 4px solid #8b5cf6;
}

.card-subtitle {
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
    font-style: italic;
}

.visualization-container {
    padding: 1rem 0;
}

.visualization-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.timeline-marker {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 80px;
    min-height: 80px;
    border: 3px solid #e5e7eb;
    overflow: hidden;
}

.timeline-marker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1;
}

.timeline-marker:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.timeline-marker:hover::before {
    background: rgba(0, 0, 0, 0.1);
}

.timeline-marker.active {
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.timeline-marker.active::before {
    background: rgba(59, 130, 246, 0.2);
}



.timeline-dot {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timeline-marker.active .timeline-dot {
    background: white;
    transform: scale(1.2);
}

.timeline-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.timeline-milestone {
    font-size: 0.65rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    background: rgba(59, 130, 246, 0.8);
    padding: 1px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
}

.timeline-complete-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    background: rgba(34, 197, 94, 0.9);
    padding: 1px 4px;
    border-radius: 3px;
    animation: pulse 2s infinite;
}

.timeline-complete {
    border-color: #22c55e !important;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5) !important;
}

.timeline-complete .timeline-dot {
    background: #22c55e !important;
    border-color: #ffffff !important;
    animation: completePulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes completePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.timeline-marker.active .timeline-label {
    color: white;
}

.visualization-screenshots {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    margin-bottom: 2rem;
    position: relative;
}

.screenshot-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.screenshot-header {
    background: #f1f5f9;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.screenshot-dots {
    display: flex;
    gap: 0.3rem;
}

.screenshot-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.screenshot-dot.red { background: #ef4444; }
.screenshot-dot.yellow { background: #f59e0b; }
.screenshot-dot.green { background: #10b981; }

.screenshot-url {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    background: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.screenshot-image {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-info {
    padding: 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.screenshot-timestamp {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.screenshot-description {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.screenshot-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar-viz {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-viz {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text-viz {
    font-size: 0.8rem;
    font-weight: 600;
    color: #3b82f6;
}

.visualization-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.visualization-speed {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.visualization-speed label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.visualization-speed select {
    padding: 0.3rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8rem;
    background: white;
}

.screenshot-hidden {
    display: none;
}

.loading-visualization {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #64748b;
}

.loading-visualization .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .banner-title {
        font-size: 2.5rem;
    }
    
    .banner-title .subtitle {
        font-size: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .btn-primary {
        justify-content: center;
        width: 100%;
    }
    
    .banner-features {
        justify-content: center;
    }
    
    .performance-preview {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .metrics-preview {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .trust-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .trust-stats {
        justify-content: center;
        gap: 2rem;
    }
    
    .trust-badges {
        justify-content: center;
        gap: 1rem;
    }
    
    .badge-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .benchmark-grid {
        grid-template-columns: 1fr;
    }
    
    /* Results Section Mobile */
    .overall-score-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        gap: 2rem;
    }
    
    .score-display {
        justify-content: center;
    }
    
    .score-item .label {
        min-width: 120px;
        font-size: 0.9rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .waterfall-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }
    
    .resource-timeline {
        margin: 0.5rem 0;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .results-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Speed Dashboard Preview Mobile */
    .speed-dashboard-preview .performance-preview {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .speed-dashboard-preview .metrics-preview {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .speed-dashboard-preview .metric-item {
        justify-content: center;
    }
    
    /* Loading Section Mobile */
    .loading-steps {
        gap: 1rem;
    }
    
    .step-item {
        min-width: 80px;
    }
    
    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-text {
        font-size: 0.8rem;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
    }
    
    .progress-text {
        font-size: 0.9rem;
    }
    
    /* Speed Visualization Mobile Styles */
    .visualization-timeline {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .timeline-marker {
        min-width: 60px;
        padding: 0.3rem;
    }
    
    .timeline-label {
        font-size: 0.7rem;
    }
    
    .screenshot-container {
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .screenshot-header {
        padding: 0.5rem;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .screenshot-url {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    .screenshot-info {
        padding: 0.8rem;
    }
    
    .screenshot-timestamp {
        font-size: 0.9rem;
    }
    
    .screenshot-description {
        font-size: 0.8rem;
    }
    
    .visualization-controls {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .visualization-speed {
        justify-content: center;
    }
    
    .visualization-screenshots {
         min-height: 300px;
     }
     
     /* Timeline Marker Mobile Styles */
     .timeline-marker {
         min-width: 60px;
         min-height: 60px;
         padding: 0.3rem;
     }
     
     .timeline-label {
          font-size: 0.65rem;
          padding: 1px 4px;
      }
      
      .timeline-milestone {
          font-size: 0.55rem;
          padding: 1px 3px;
      }
      
      .timeline-complete-badge {
          font-size: 0.5rem;
          padding: 1px 3px;
      }
      
      .timeline-dot {
          width: 10px;
          height: 10px;
      }
 }
    
    /* Loading Section Mobile */
    .loading-steps {
        gap: 1rem;
    }
    
    .step-item {
        min-width: 80px;
    }
    
    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-text {
        font-size: 0.8rem;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
    }


@media (max-width: 576px) {
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-title .subtitle {
        font-size: 1.2rem;
    }
    
    .speed-dashboard {
        padding: 1.5rem;
    }
    
    .trust-stats {
        gap: 1.5rem;
    }
    
    .trust-badges {
        gap: 1rem;
    }
    
    .advanced-feature-item {
        flex-direction: column;
        text-align: center;
    }
}