/* Analyzer section */
.analyzer-section {
    padding-top: 120px;
    min-height: calc(100vh - 200px);
    background: var(--bg-white);
    color: var(--text-body);
}

.analyzer-section .section-header {
    margin-bottom: 40px;
}

/* Intro section - uses about-* classes from main style.css */

/* Input */
.input-section {
    margin-bottom: 16px;
}

.input-group {
    display: flex;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.input-group input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 1rem;
    font-family: var(--font);
    outline: none;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-group .btn {
    padding: 14px 32px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

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

/* Scores */
.score-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 16px;
}

.score-overview .score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-legend-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.score-legend-card h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.score-legend-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-legend-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.score-circle {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 8px;
}

.score-circle svg {
    transform: rotate(-90deg);
    width: 140px;
    height: 140px;
}

.score-bg {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 10;
}

.score-fill {
    fill: none;
    stroke: var(--purple);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1.5s ease, stroke 0.5s;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.score-card h3 {
    text-align: center;
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.score-formula {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.device-section {
    margin-bottom: 24px;
}

.device-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.score-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.score-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.card-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.card-score {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.score-card h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-bar {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.card-bar-fill {
    height: 100%;
    width: 0;
    min-width: 0;
    border-radius: 4px;
    background: #22c55e;
    transition: width 1s ease-out;
}

/* GEO */
.geo-section {
    margin-bottom: 40px;
}

.geo-section h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.geo-score-card {
    text-align: center;
    margin-bottom: 24px;
}

.geo-score-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 8px;
}

.geo-score-circle svg {
    transform: rotate(-90deg);
    width: 120px;
    height: 120px;
}

.geo-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
}

.geo-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.geo-check-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.geo-check-info {
    flex: 1;
}

.geo-check-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: var(--text-dark);
}

.geo-check-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.geo-check-points {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    text-align: right;
}

.pass { color: #22c55e; }
.fail { color: #ef4444; }

/* Details / Report Table */
.details-section h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.report-table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.report-table th,
.report-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.report-table th {
    background: var(--bg-section);
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
}

.report-table td {
    color: var(--text-muted);
}

.report-table td.metric-label {
    font-weight: 600;
    color: var(--text-dark);
}

.report-table tbody tr:hover {
    background: var(--bg-section);
}

@media (max-width: 768px) {
    .report-table th,
    .report-table td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
    .score-overview {
        grid-template-columns: 1fr;
    }
}

/* Raw data */
.raw-data-section {
    margin-top: 40px;
}

.raw-data-section details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.raw-data-section summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
}

.raw-data-section pre {
    margin-top: 12px;
    max-height: 400px;
    overflow: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-all;
}

/* PRO Section */
.pro-section {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid var(--border);
}

.pro-card {
    text-align: center;
    margin-bottom: 40px;
}

.pro-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.pro-card h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.pro-card p {
    color: var(--text-body);
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.pro-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.pro-honeypot {
    display: none !important;
}

.pro-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.pro-form-group {
    display: flex;
    flex-direction: column;
}

.pro-form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.pro-form-group .required {
    color: #EF4444;
}

.pro-form-group input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text-dark);
    background: var(--bg-white);
    transition: var(--transition);
}

.pro-form-group input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.pro-form-group input::placeholder {
    color: var(--text-muted);
}

.pro-form-consent {
    margin-bottom: 24px;
}

.pro-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.5;
}

.pro-checkbox input {
    margin-top: 3px;
    accent-color: var(--purple);
}

.pro-checkbox a {
    color: var(--purple);
    text-decoration: underline;
}

.pro-checkbox a:hover {
    text-decoration: none;
}

.pro-submit {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
}

.pro-form-success {
    text-align: center;
    padding: 40px;
}

.pro-form-success h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.pro-form-success p {
    color: var(--text-body);
}

@media (max-width: 768px) {
    .pro-form-grid {
        grid-template-columns: 1fr;
    }
    .pro-form {
        padding: 24px;
    }
}

/* Error */
.error-box {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--radius);
    padding: 20px;
    color: #DC2626;
    text-align: center;
    margin-top: 20px;
}

.score-good { color: #22c55e; }
.score-ok { color: #F59E0B; }
.score-bad { color: #EF4444; }

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .input-group {
        flex-direction: column;
    }
    .analyzer-section {
        padding-top: 100px;
    }
}

/* Legal Scanner */
#legalSection {
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius);
    padding: 24px;
    background: rgba(168, 85, 247, 0.03);
}

#legalSection h2 {
    color: #a855f7;
}

#legalSection .geo-score-circle .score-fill {
    stroke: #a855f7;
}

.severity-high {
    border-left: 3px solid #EF4444 !important;
    background: rgba(239, 68, 68, 0.04) !important;
}

.severity-medium {
    border-left: 3px solid #F59E0B !important;
    background: rgba(245, 158, 11, 0.04) !important;
}

#legalSection .geo-check {
    transition: background 0.2s;
}

#legalSection .geo-check:hover {
    background: rgba(168, 85, 247, 0.05);
}

/* Operator Notes */
.pro-notes-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.pro-notes-section h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pro-notes-section .pro-section-desc {
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pro-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--bg-white);
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.pro-textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.pro-textarea::placeholder {
    color: var(--text-muted);
}

.pro-notes-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

.pro-save-status {
    font-size: 0.85rem;
    color: #22c55e;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.pro-save-status.visible {
    opacity: 1;
}

/* PDF Button */
.pro-pdf-section {
    margin-top: 20px;
    text-align: center;
}

.btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #DC2626;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-pdf:hover {
    background: #B91C1C;
    transform: translateY(-1px);
}

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

.btn-pdf:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    transform: none;
}

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

@media (max-width: 768px) {
    .pro-notes-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}
