/**
 * Agency SEO Suite - Stylesheet
 * High-Converting B2B Agency Diagnostic Utilities
 */

:root {
    --agt-primary: #4f46e5;
    --agt-primary-hover: #4338ca;
    --agt-primary-light: #eef2ff;
    --agt-accent: #06b6d4;
    --agt-success: #10b981;
    --agt-success-bg: #ecfdf5;
    --agt-warning: #f59e0b;
    --agt-warning-bg: #fffbeb;
    --agt-danger: #ef4444;
    --agt-danger-bg: #fef2f2;
    --agt-dark: #0f172a;
    --agt-dark-card: #1e293b;
    --agt-gray-50: #f8fafc;
    --agt-gray-100: #f1f5f9;
    --agt-gray-200: #e2e8f0;
    --agt-gray-300: #cbd5e1;
    --agt-gray-600: #475569;
    --agt-gray-700: #334155;
    --agt-gray-800: #1e293b;
    --agt-gray-900: #0f172a;
    --agt-radius: 12px;
    --agt-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --agt-shadow-lg: 0 20px 35px -5px rgba(0, 0, 0, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.06);
}

.agt-app-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--agt-gray-800);
    line-height: 1.6;
    margin: 20px 0;
}

.agt-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Tool Header & Banner */
.agt-hero-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
    color: #ffffff;
    border-radius: var(--agt-radius);
    padding: 36px 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--agt-shadow-lg);
}

.agt-hero-header::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(99, 102, 241, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.agt-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #38bdf8;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.agt-hero-title {
    font-size: 30px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.25;
}

.agt-hero-desc {
    font-size: 16px;
    color: #cbd5e1;
    max-width: 860px;
    margin: 0 0 16px 0;
}

.agt-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #94a3b8;
}

.agt-meta-item strong {
    color: #f1f5f9;
}

/* Card Containers */
.agt-card {
    background: #ffffff;
    border: 1px solid var(--agt-gray-200);
    border-radius: var(--agt-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--agt-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.agt-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--agt-gray-900);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Forms & Inputs */
.agt-form-group {
    margin-bottom: 18px;
}

.agt-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--agt-gray-700);
    margin-bottom: 6px;
}

.agt-input, .agt-textarea, .agt-select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--agt-gray-300);
    border-radius: 8px;
    font-size: 14px;
    color: var(--agt-gray-900);
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.agt-input:focus, .agt-textarea:focus, .agt-select:focus {
    outline: none;
    border-color: var(--agt-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.agt-textarea {
    min-height: 120px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
}

/* Buttons */
.agt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.2s ease;
}

.agt-btn-primary {
    background: var(--agt-primary);
    color: #ffffff !important;
}

.agt-btn-primary:hover {
    background: var(--agt-primary-hover);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.agt-btn-secondary {
    background: var(--agt-gray-100);
    color: var(--agt-gray-700) !important;
    border: 1px solid var(--agt-gray-300);
}

.agt-btn-secondary:hover {
    background: var(--agt-gray-200);
}

.agt-btn-success {
    background: var(--agt-success);
    color: #ffffff !important;
}

.agt-btn-success:hover {
    background: #059669;
}

.agt-btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.agt-btn-block {
    width: 100%;
}

/* Badges */
.agt-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.agt-badge-success { background: var(--agt-success-bg); color: var(--agt-success); border: 1px solid rgba(16, 185, 129, 0.3); }
.agt-badge-warning { background: var(--agt-warning-bg); color: var(--agt-warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.agt-badge-danger { background: var(--agt-danger-bg); color: var(--agt-danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.agt-badge-info { background: var(--agt-primary-light); color: var(--agt-primary); border: 1px solid rgba(79, 70, 229, 0.3); }

/* Agency Lead Hook Banner */
.agt-lead-hook {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-left: 5px solid #06b6d4;
    border-radius: var(--agt-radius);
    padding: 24px;
    color: #ffffff;
    margin: 28px 0;
    box-shadow: var(--agt-shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.agt-lead-hook-content {
    flex: 1 1 500px;
}

.agt-lead-hook-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
}

.agt-lead-hook-desc {
    font-size: 14px;
    color: #cbd5e1;
    margin: 0;
}

.agt-lead-hook-action {
    flex: 0 0 auto;
}

.agt-btn-hook {
    background: #06b6d4;
    color: #0f172a !important;
    font-weight: 700;
    padding: 13px 26px;
    border-radius: 8px;
    font-size: 15px;
    border: none;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.agt-btn-hook:hover {
    background: #22d3ee;
    transform: translateY(-2px);
}

/* Lead Modal */
.agt-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.agt-modal-overlay.active {
    display: flex;
}

.agt-modal-box {
    background: #ffffff;
    border-radius: 16px;
    max-width: 540px;
    width: 100%;
    padding: 32px;
    box-shadow: var(--agt-shadow-lg);
    position: relative;
    animation: agtModalIn 0.25s ease-out;
}

@keyframes agtModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.agt-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 22px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--agt-gray-600);
}

.agt-modal-header {
    margin-bottom: 20px;
}

.agt-modal-header h3 {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--agt-gray-900);
}

/* Code Output / Pre Blocks */
.agt-code-wrap {
    position: relative;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 14px;
}

.agt-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #1e293b;
    color: #94a3b8;
    font-size: 12px;
    font-family: monospace;
}

.agt-code-block {
    padding: 16px;
    color: #38bdf8;
    background: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    max-height: 380px;
    overflow-y: auto;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Grid & Columns */
.agt-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

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

@media (max-width: 900px) {
    .agt-grid-2, .agt-grid-3, .agt-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Metric / Stat Card */
.agt-stat-card {
    background: var(--agt-gray-50);
    border: 1px solid var(--agt-gray-200);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.agt-stat-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--agt-primary);
    line-height: 1.2;
}

.agt-stat-label {
    font-size: 13px;
    color: var(--agt-gray-600);
    margin-top: 4px;
    font-weight: 600;
}

/* Tool Comparison Matrix Table */
.agt-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--agt-gray-200);
    background: #ffffff;
}

.agt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.agt-table th {
    background: var(--agt-gray-100);
    color: var(--agt-gray-700);
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 2px solid var(--agt-gray-200);
    white-space: nowrap;
}

.agt-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--agt-gray-200);
    color: var(--agt-gray-800);
}

.agt-table tr:hover {
    background: var(--agt-gray-50);
}

/* Visual Silo Tree SVG */
.agt-tree-container {
    background: #0f172a;
    border-radius: 10px;
    min-height: 520px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

.agt-tree-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.agt-tree-svg {
    width: 100%;
    height: 520px;
    display: block;
    cursor: grab;
}

.agt-tree-svg:active {
    cursor: grabbing;
}

/* Shingle Duplicate Highlighting */
.agt-shingle-pane {
    background: #ffffff;
    border: 1px solid var(--agt-gray-300);
    border-radius: 8px;
    padding: 14px;
    min-height: 240px;
    max-height: 380px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.7;
}

.agt-dup-match {
    background-color: #fee2e2;
    color: #991b1b;
    border-bottom: 2px solid #ef4444;
    padding: 1px 2px;
    border-radius: 3px;
    font-weight: 600;
}

/* CrUX Gauges */
.agt-crux-bar-wrap {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin: 8px 0;
    display: flex;
}

.agt-crux-good { background: #10b981; }
.agt-crux-needs-imp { background: #f59e0b; }
.agt-crux-poor { background: #ef4444; }

/* Drag & Drop File Zone */
.agt-dropzone {
    border: 2px dashed var(--agt-gray-300);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    background: var(--agt-gray-50);
    cursor: pointer;
    transition: all 0.2s ease;
}

.agt-dropzone:hover, .agt-dropzone.dragover {
    border-color: var(--agt-primary);
    background: var(--agt-primary-light);
}

.agt-dropzone i, .agt-dropzone svg {
    font-size: 32px;
    color: var(--agt-primary);
    margin-bottom: 8px;
}

/* AI Checker Sentence-by-Sentence Highlighting */
.agt-highlight-box {
    background: #ffffff;
    border: 1.5px solid var(--agt-gray-300);
    border-radius: 10px;
    padding: 22px;
    min-height: 260px;
    max-height: 480px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.9;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.agt-sentence {
    display: inline;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 4px;
    transition: background 0.2s ease;
    cursor: default;
}

.agt-sentence:hover {
    filter: brightness(0.95);
}

.agt-sent-ai {
    background-color: #fee2e2;
    color: #991b1b;
    border-bottom: 2px solid #ef4444;
}

.agt-sent-hybrid {
    background-color: #fef3c7;
    color: #92400e;
    border-bottom: 2px solid #f59e0b;
}

.agt-sent-human {
    background-color: #ecfdf5;
    color: #065f46;
    border-bottom: 2px solid #10b981;
}

/* AI Checker & Humanizer Counters */
.agt-counter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Humanizer Dual Layout */
.agt-humanizer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .agt-humanizer-grid {
        grid-template-columns: 1fr;
    }
}

