/* public/styles/checker.css */

.site-checker-section {
    padding: 4rem 1rem;
    display: flex;
    justify-content: center;
}

.checker-card {
    width: 100%;
    max-width: 900px;
    background: var(--bg-card, #111827);
    border: 1px solid var(--border-color, #1f2937);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5),
        0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.interactive-glow {
    position: relative;
    overflow: hidden;
}

.interactive-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.checker-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 2rem;
}

.checker-header h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.checker-header p {
    color: #9ca3af;
    font-size: 0.95rem;
}

/* Форма */
.checker-form {
    position: relative;
    z-index: 1;
    text-align: center;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.input-group input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid #374151;
    background: #1f2937;
    color: #f3f4f6;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: #8b5cf6;
}

.input-group button {
    padding: 1rem 2rem;
    border-radius: 9999px;
    border: none;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.input-group button:hover {
    transform: translateY(-2px);
}

.checker-hint {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Progress */
.checker-progress {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 0;
}

.scanner-container {
    max-width: 400px;
    margin: 0 auto 2rem;
    background: #1f2937;
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #8b5cf6;
    box-shadow: 0 0 10px #8b5cf6, 0 0 20px #8b5cf6;
    animation: scan 2s linear infinite alternate;
}

@keyframes scan {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.step {
    font-size: 0.9rem;
    font-family: monospace;
    padding-left: 1.5rem;
    position: relative;
    color: #6b7280;
}

.step::before {
    content: '⏳';
    position: absolute;
    left: 0;
}

.step.active {
    color: #8b5cf6;
    font-weight: bold;
}

.step.active::before {
    content: '⚙️';
    animation: spin 2s linear infinite;
}

.step.done {
    color: #10b981;
}

.step.done::before {
    content: '✅';
}

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

/* Results Header */
.checker-results {
    position: relative;
    z-index: 1;
    animation: fadeIn 0.5s ease-out;
}

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

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374151;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.domain-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.domain-info h3 {
    font-size: 1.25rem;
    margin: 0;
    color: #f3f4f6;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-cache {
    background: #374151;
    color: #9ca3af;
}

.res-time {
    color: #6b7280;
    font-size: 0.85rem;
}

/* Geo Grade */
.geo-grade-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.9));
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 1px solid #374151;
}

.grade-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 900;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.grade-a {
    color: #10B981;
    border: 4px solid #10B981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.grade-b {
    color: #3B82F6;
    border: 4px solid #3B82F6;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.grade-c {
    color: #F59E0B;
    border: 4px solid #F59E0B;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.grade-d,
.grade-f {
    color: #EF4444;
    border: 4px solid #EF4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.grade-details h4 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.grade-details p {
    color: #9ca3af;
    margin: 0;
    max-width: 400px;
}

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

.metric-card {
    background: #1f2937;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #374151;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #d1d5db;
    font-weight: bold;
}

.metric-value {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
}

.score-max {
    font-size: 1rem;
    color: #6b7280;
    font-weight: normal;
    margin-left: 2px;
}

.metric-bar {
    height: 6px;
    background: #374151;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.bar-fill {
    height: 100%;
    transition: width 1s ease-out, background-color 0.3s;
    width: 0%;
}

.metric-meta {
    font-size: 0.85rem;
    color: #9ca3af;
    font-family: monospace;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

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

.rec-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background: #1f2937;
    border-left: 4px solid transparent;
}

.rec-card.impact-high {
    border-left-color: #EF4444;
    background: rgba(239, 68, 68, 0.05);
}

.rec-card.impact-medium {
    border-left-color: #F59E0B;
    background: rgba(245, 158, 11, 0.05);
}

.rec-card.impact-low {
    border-left-color: #3B82F6;
    background: rgba(59, 130, 246, 0.05);
}

.rec-icon {
    font-size: 2rem;
    line-height: 1;
}

.rec-content h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #f3f4f6;
}

.rec-content p {
    margin: 0 0 1rem 0;
    color: #d1d5db;
    font-size: 0.95rem;
    line-height: 1.5;
}

.rec-cta {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.2s;
}

.rec-cta:hover {
    opacity: 0.8;
}

.cta-type-affiliate {
    background: #10B981;
    color: white !important;
}

.cta-type-product {
    background: #8b5cf6;
    color: white !important;
}

.cta-type-article {
    background: transparent;
    border: 1px solid #8b5cf6;
    color: #8b5cf6 !important;
}

.hidden {
    display: none !important;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

@media (max-width: 640px) {
    .geo-grade-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group button {
        width: 100%;
    }
}