/* ======================================================
   SPEED CHECKER TOOL STYLES
   ====================================================== */

/* Tool Hero */
.tool-hero {
    background:
        linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.85)),
        url('/images/mtc-web-design.webp') center/cover no-repeat;
    height: 60vh;
    min-height: 400px;
    margin-top: 90px;
}

.tool-hero .hero-overlay {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tool Section */
.tool-section {
    padding: 80px 0;
    background: #111827;
    min-height: 50vh;
}

/* Input Wrapper */
.tool-input-wrapper {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.tool-input-wrapper h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    color: #f9fafb;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.url-input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: #f9fafb;
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
}

.url-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.08);
}

.url-input::placeholder {
    color: #6b7280;
}

.input-group .cta-btn {
    padding: 1.2rem 2.5rem;
    white-space: nowrap;
}

.help-text {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Device Selector */
.device-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.device-btn {
    padding: 0.8rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #d1d5db;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.device-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.device-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: #d1d5db;
    font-size: 1.1rem;
}

.loading-subtext {
    font-size: 0.9rem !important;
    color: #9ca3af !important;
    margin-top: 0.5rem;
}

/* Results Wrapper */
.results-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 2rem;
}

/* Score Card */
.score-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.3);
}

.score-card.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.score-card.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.score-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 8px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.score-value {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
}

.score-text {
    font-size: 1.2rem;
    color: #fff;
    opacity: 0.9;
}

/* Core Web Vitals Grid */
.vitals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.vital-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.vital-card h4 {
    font-size: 1rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    text-transform: none;
    font-weight: 600;
}

.vital-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: #f9fafb;
    margin-bottom: 0.5rem;
}

.vital-status {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

.vital-status.good {
    background: #10b981;
    color: #fff;
}

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

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

/* Result Cards */
.result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.result-card h3 {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    margin-bottom: 1.5rem;
    color: #f9fafb;
}

/* Opportunities */
.opportunities-content,
.diagnostics-content {
    color: #d1d5db;
}

.opportunity-item,
.diagnostic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 1rem;
    border-left: 4px solid #3b82f6;
}

.opportunity-item:last-child,
.diagnostic-item:last-child {
    margin-bottom: 0;
}

.item-left {
    flex: 1;
}

.item-title {
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.item-description {
    font-size: 0.9rem;
    color: #9ca3af;
    margin: 0;
}

.item-savings {
    font-size: 1.2rem;
    font-weight: 700;
    color: #10b981;
    white-space: nowrap;
    margin-left: 1rem;
}

/* Results CTA */
.results-cta {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-radius: 20px;
    margin-top: 3rem;
}

.results-cta h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1rem;
    color: #f9fafb;
}

.results-cta p {
    font-size: 1.1rem;
    color: #d1d5db;
    margin-bottom: 2rem;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 3rem 2rem;
}

.error-message {
    color: #ef4444;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
}

/* Info Section */
.info-section {
    padding: 100px 0;
    background: #0a0a0a;
    text-align: center;
}

.info-section h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 4rem;
    color: #f9fafb;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #3b82f6;
}

.info-card p {
    color: #d1d5db;
    line-height: 1.7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }

    .input-group .cta-btn {
        width: 100%;
    }

    .device-selector {
        flex-direction: column;
    }

    .device-btn {
        width: 100%;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

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

    .vitals-grid {
        grid-template-columns: 1fr;
    }

    .result-card {
        padding: 1.5rem;
    }

    .opportunity-item,
    .diagnostic-item {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .item-savings {
        margin-left: 0;
    }
}
