/* Tor Detection Page Styles — follows whois_lookup.css conventions */

/* ─── Hero ─────────────────────────────────────── */

.tor-hero-section {
    background: linear-gradient(135deg, var(--primary-50) 0%, #ffffff 100%);
    padding: 80px 0;
    min-height: 580px;
}

.tor-hero-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.tor-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.tor-hero-content {
    padding-right: 24px;
    padding-top: 16px;
}

.tor-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fef9ec;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.tor-hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
    flex-shrink: 0;
    animation: tor-pulse 2s ease-in-out infinite;
}

@keyframes tor-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

.tor-hero-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--text-color);
}

.tor-hero-subtitle {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-color);
}

.tor-hero-highlight {
    color: var(--primary-500);
    position: relative;
}

.tor-hero-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(55, 125, 255, 0.15);
    z-index: -1;
}

.tor-hero-description {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.tor-hero-trust {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tor-hero-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.tor-hero-trust-item svg {
    color: var(--success-color, #16a34a);
    flex-shrink: 0;
}

/* ─── Form card ────────────────────────────────── */

.tor-hero-form-wrapper {
    position: relative;
}

.tor-hero-form-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ─── Live counter ──────────────────────────────── */

.tor-live-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: #fef9ec;
    border: 1px solid #fde68a;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tor-live-counter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    flex-shrink: 0;
    animation: tor-pulse 2s ease-in-out infinite;
}

.tor-live-counter-number {
    font-size: 16px;
    font-weight: 700;
    color: #92400e;
    font-variant-numeric: tabular-nums;
}

.tor-live-counter-label {
    font-size: 13px;
    color: #a16207;
}

/* ─── Form ──────────────────────────────────────── */

.tor-hero-form-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
}

.tor-hero-form-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.tor-lookup-form {
    margin-bottom: 0;
}

.tor-form-row {
    display: flex;
    gap: 8px;
}

.tor-form-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    outline: none;
    transition: border-color 0.15s;
    background: var(--bg-secondary, #f9fafb);
    color: var(--text-color);
}

.tor-form-input:focus {
    border-color: var(--primary-500);
    background: white;
}

.tor-form-input::placeholder {
    color: var(--text-placeholder, #9ca3af);
    font-family: inherit;
}

.tor-form-submit {
    padding: 12px 20px;
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s;
}

.tor-form-submit:hover {
    background: var(--primary-600, #2563eb);
}

.tor-form-submit:active {
    transform: scale(0.98);
}

.tor-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── Alerts ────────────────────────────────────── */

.tor-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
}

.tor-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.tor-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ─── Results ───────────────────────────────────── */

.tor-results {
    margin-top: 16px;
}

.tor-result-card {
    border-radius: 12px;
    padding: 16px;
    border: 1px solid;
}

.tor-result-card.tor-result-detected {
    background: #fef2f2;
    border-color: #fecaca;
}

.tor-result-card.tor-result-clean {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.tor-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.tor-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tor-result-badge.tor-detected {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.tor-result-badge.tor-clean {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.tor-result-ip {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 13px;
    color: var(--text-muted);
}

.tor-result-meta {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.tor-result-api-ref {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tor-result-api-ref code {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    color: var(--primary-500);
    background: var(--primary-50);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

/* ─── What is Tor section ───────────────────────── */

.tor-what-section {
    padding: 80px 0;
    background: white;
}

.tor-what-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.tor-what-header {
    text-align: center;
    margin-bottom: 48px;
}

.tor-what-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.tor-what-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 620px;
    margin: 0 auto;
}

.tor-what-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.tor-what-card {
    background: var(--bg-secondary, #f9fafb);
    border-radius: 12px;
    padding: 28px 24px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.tor-what-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-100, #dbeafe);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary-500);
}

.tor-what-card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.tor-what-card-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── Tor circuit diagram ───────────────────────── */

.tor-circuit {
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 28px 32px;
}

.tor-circuit-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
    text-align: center;
}

.tor-circuit-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    row-gap: 12px;
}

.tor-circuit-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tor-circuit-node {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.tor-circuit-node-user {
    background: #e0e7ff;
    color: #4338ca;
}

.tor-circuit-node-relay {
    background: var(--primary-100, #dbeafe);
    color: var(--primary-600, #2563eb);
}

.tor-circuit-node-exit {
    background: #fef9ec;
    color: #92400e;
    border: 2px solid #f59e0b;
}

.tor-circuit-node-dest {
    background: #f0fdf4;
    color: #15803d;
}

.tor-circuit-label {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    max-width: 70px;
    line-height: 1.3;
}

.tor-circuit-arrow {
    color: var(--border-color, #d1d5db);
    font-size: 18px;
    margin-top: -16px;
    font-weight: 300;
}

/* ─── Use Cases section ─────────────────────────── */

.tor-usecases-section {
    padding: 80px 0;
    background: var(--bg-secondary, #f9fafb);
}

.tor-usecases-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.tor-usecases-header {
    text-align: center;
    margin-bottom: 48px;
}

.tor-usecases-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
}

.tor-usecases-highlight {
    color: var(--primary-500);
}

.tor-usecases-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

.tor-usecases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tor-usecase-card {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 24px;
    transition: box-shadow 0.2s;
}

.tor-usecase-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.tor-usecase-card-note {
    background: #fef9ec;
    border-color: #fde68a;
}

.tor-usecase-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-50);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-500);
    margin-bottom: 14px;
}

.tor-usecase-icon-note {
    background: #fef9ec;
    color: #92400e;
}

.tor-usecase-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.tor-usecase-text {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-muted);
}

/* ─── API Documentation ─────────────────────────── */

.tor-api-section {
    padding: 80px 0;
    background: white;
}

.tor-api-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.tor-api-header {
    text-align: center;
    margin-bottom: 48px;
}

.tor-api-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.tor-api-highlight {
    color: var(--primary-500);
}

.tor-api-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

.tor-api-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.tor-api-endpoint-info {
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 24px;
}

.tor-api-endpoint-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tor-api-method {
    background: var(--primary-500);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.tor-api-path {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 14px;
    color: var(--text-color);
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #e5e7eb);
    word-break: break-all;
}

.tor-api-param {
    color: var(--primary-500);
}

.tor-api-endpoint-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.tor-api-response {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tor-api-response-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.tor-api-code-block {
    background: #1e1e2e;
    border-radius: 10px;
    overflow: hidden;
}

.tor-api-code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.tor-api-code-block code {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.tor-api-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tor-api-fields h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.tor-api-field {
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: 13px;
    padding: 8px 12px;
    background: var(--bg-secondary, #f9fafb);
    border-radius: 6px;
}

.tor-api-field code {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 12px;
    color: var(--primary-700, #1d4ed8);
    background: var(--primary-50);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.tor-api-field span {
    color: var(--text-muted);
    line-height: 1.4;
}

/* ─── Code example tabs ─────────────────────────── */

.tor-code-examples {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tor-code-examples-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.tor-code-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.tor-code-tab {
    padding: 7px 16px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: white;
    color: var(--text-muted);
    transition: all 0.15s;
}

.tor-code-tab.active {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

.tor-code-panel {
    display: none;
}

.tor-code-panel.active {
    display: block;
}

/* ─── FAQ ───────────────────────────────────────── */

.tor-faq-section {
    padding: 80px 0;
    background: var(--bg-secondary, #f9fafb);
}

.tor-faq-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

.tor-faq-header {
    text-align: center;
    margin-bottom: 48px;
}

.tor-faq-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
}

.tor-faq-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
}

.tor-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tor-faq-item {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}

.tor-faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.15s;
}

.tor-faq-question:hover {
    background: var(--bg-secondary, #f9fafb);
}

.tor-faq-icon {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.tor-faq-item.open .tor-faq-icon {
    transform: rotate(180deg);
}

.tor-faq-answer {
    display: none;
    padding: 0 20px 18px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.tor-faq-item.open .tor-faq-answer {
    display: block;
}

.tor-faq-answer p {
    margin: 0;
}

.tor-faq-answer a {
    color: var(--primary-500);
    text-decoration: none;
}

.tor-faq-answer a:hover {
    text-decoration: underline;
}

.tor-faq-answer code {
    font-family: 'ui-monospace', 'SFMono-Regular', monospace;
    font-size: 12px;
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary-700, #1d4ed8);
}

/* ─── Responsive ────────────────────────────────── */

@media (max-width: 968px) {
    .tor-hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .tor-hero-content {
        padding-right: 0;
    }

    .tor-hero-title {
        font-size: 32px;
    }

    .tor-what-grid {
        grid-template-columns: 1fr;
    }

    .tor-usecases-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .tor-hero-section {
        padding: 48px 0;
    }

    .tor-hero-title {
        font-size: 26px;
    }

    .tor-hero-subtitle {
        font-size: 18px;
    }

    .tor-form-row {
        flex-direction: column;
    }

    .tor-form-submit {
        width: 100%;
    }

    .tor-usecases-grid {
        grid-template-columns: 1fr;
    }

    .tor-circuit-flow {
        gap: 4px;
    }

    .tor-circuit-label {
        display: none;
    }

    .tor-circuit-arrow {
        margin-top: 0;
    }

    .tor-what-title,
    .tor-usecases-title,
    .tor-api-title,
    .tor-faq-title {
        font-size: 24px;
    }

    .tor-what-section,
    .tor-usecases-section,
    .tor-api-section,
    .tor-faq-section {
        padding: 48px 0;
    }
}

/* ─── Responsive container widths ───────────────── */

@media (min-width: 600px) {
    .tor-hero-container,
    .tor-what-container,
    .tor-usecases-container,
    .tor-api-container {
        max-width: 720px;
    }
}

@media (min-width: 900px) {
    .tor-hero-container,
    .tor-what-container,
    .tor-usecases-container,
    .tor-api-container {
        max-width: 1236px;
    }
}
