/* ============================================
   ScamDetect - Modern UI Theme
   ============================================ */

/* CSS Variables - Modern Teal/Cyan Theme */
:root {
    /* Primary Colors */
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --primary-light: #22d3ee;
    --primary-glow: rgba(6, 182, 212, 0.4);

    /* Accent Gradient */
    --gradient-start: #06b6d4;
    --gradient-mid: #0ea5e9;
    --gradient-end: #6366f1;

    /* Status Colors */
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.3);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    --safe: #22c55e;

    /* Background Colors */
    --bg-dark: #0a0f1a;
    --bg-darker: #060912;
    --bg-card: rgba(15, 23, 42, 0.8);
    --bg-card-solid: #0f172a;
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --bg-glass: rgba(15, 23, 42, 0.6);

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Border & Effects */
    --border: rgba(51, 65, 85, 0.5);
    --border-glow: rgba(6, 182, 212, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--primary-glow);

    /* Spacing */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(14, 165, 233, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
}

.hidden {
    display: none !important;
}

/* ============================================
   Language Switcher
   ============================================ */
.language-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.lang-btn {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.lang-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ============================================
   Header
   ============================================ */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.shield-icon {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 0 20px var(--primary-glow));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo h1 {
    font-size: 2.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
    letter-spacing: -0.02em;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* ============================================
   Search Section
   ============================================ */
.search-section {
    margin-bottom: 2.5rem;
}

.search-form {
    width: 100%;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-md), 0 0 0 3px var(--border-glow);
}

.input-wrapper:hover {
    border-color: rgba(6, 182, 212, 0.4);
}

.search-icon {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    margin: 0 1rem;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.input-wrapper:focus-within .search-icon {
    color: var(--primary);
}

#urlInput {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.875rem 0;
    outline: none;
    font-weight: 400;
}

#urlInput::placeholder {
    color: var(--text-muted);
}

.analyze-btn {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.analyze-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.analyze-btn:hover::before {
    left: 100%;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--primary-glow);
}

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

/* ============================================
   Loading Section
   ============================================ */
.loading-section {
    text-align: center;
    padding: 4rem 0;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.spinner {
    width: 64px;
    height: 64px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px var(--primary-glow);
}

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

.loader > p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.loading-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    max-width: 600px;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.step.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 15px var(--primary-glow);
    animation: pulse-border 1.5s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 15px var(--primary-glow); }
    50% { box-shadow: 0 0 25px var(--primary-glow); }
}

.step.completed {
    color: var(--success);
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.step-icon {
    font-size: 1.125rem;
}

/* ============================================
   Results Section
   ============================================ */
.results-section {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Score Card
   ============================================ */
.score-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.score-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
}

.score-circle {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    position: relative;
}

.circular-chart {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.circle-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 3;
}

.circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    animation: progress 1.2s ease-out forwards;
    transition: stroke var(--transition-normal);
}

@keyframes progress {
    0% { stroke-dasharray: 0 100; }
}

.score-text {
    fill: var(--text-primary);
    font-size: 0.5em;
    font-weight: 700;
    text-anchor: middle;
}

.score-info {
    flex: 1;
}

.risk-level {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.risk-level.safe {
    color: var(--safe);
    text-shadow: 0 0 20px var(--success-glow);
}
.risk-level.low {
    color: var(--success);
    text-shadow: 0 0 20px var(--success-glow);
}
.risk-level.medium {
    color: var(--warning);
    text-shadow: 0 0 20px var(--warning-glow);
}
.risk-level.high {
    color: #f97316;
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}
.risk-level.dangerous {
    color: var(--danger);
    text-shadow: 0 0 20px var(--danger-glow);
}

.analyzed-url {
    color: var(--text-secondary);
    font-size: 0.9rem;
    word-break: break-all;
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: var(--bg-card-solid);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-top: 0.5rem;
}

/* ============================================
   Report Cards
   ============================================ */
.report-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.report-card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.report-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.report-card h3 svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.report-card ul {
    list-style: none;
}

.report-card li {
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-card-solid);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.report-card li:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.report-card li:last-child {
    margin-bottom: 0;
}

/* Card Type Styles */
.ai-summary h3 svg { color: var(--primary); }
.ai-summary p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.red-flags h3 svg { color: var(--danger); }
.red-flags li {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}
.red-flags li:hover {
    background: rgba(239, 68, 68, 0.1);
}

.positive-signs h3 svg { color: var(--success); }
.positive-signs li {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}
.positive-signs li:hover {
    background: rgba(16, 185, 129, 0.1);
}

.recommendations h3 svg { color: var(--warning); }
.recommendations li {
    border-left-color: var(--primary);
    background: rgba(6, 182, 212, 0.05);
}
.recommendations li:hover {
    background: rgba(6, 182, 212, 0.1);
}

/* AI Status Badge */
.ai-status-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.875rem;
    border-radius: 2rem;
    font-weight: 600;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-status-badge.ai-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(34, 197, 94, 0.2));
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ai-status-badge.ai-fallback {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.ai-error-message {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    color: var(--danger);
    font-size: 0.875rem;
}

/* ============================================
   Report Grid
   ============================================ */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.report-grid .report-card {
    margin-bottom: 0;
}

/* ============================================
   Tabs
   ============================================ */
.detailed-analysis {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.tab-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   Info Table
   ============================================ */
.info-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.info-table tr {
    transition: background var(--transition-fast);
}

.info-table tr:hover {
    background: rgba(6, 182, 212, 0.03);
}

.info-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table td:first-child {
    color: var(--text-muted);
    font-size: 0.875rem;
    width: 40%;
    font-weight: 500;
}

.info-table td:last-child {
    font-weight: 500;
    word-break: break-word;
    color: var(--text-primary);
}

/* Status Indicators */
.status-valid {
    color: var(--success);
    font-weight: 600;
}

.status-invalid {
    color: var(--danger);
    font-weight: 600;
}

.status-warning {
    color: var(--warning);
    font-weight: 600;
}

/* ============================================
   Reviews Content
   ============================================ */
#reviewsContent {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-source {
    background: var(--bg-card-solid);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
}

.review-source:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.review-source h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.rating-stars {
    color: var(--warning);
    letter-spacing: 2px;
}

.review-link {
    color: var(--primary);
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.review-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ============================================
   New Analysis Button
   ============================================ */
.new-analysis-btn {
    width: 100%;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.new-analysis-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    transition: width var(--transition-normal);
    z-index: -1;
}

.new-analysis-btn:hover::before {
    width: 100%;
}

.new-analysis-btn:hover {
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 20px var(--primary-glow);
}

/* ============================================
   Error Section
   ============================================ */
.error-section {
    text-align: center;
    padding: 4rem 0;
}

.error-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.error-card svg {
    width: 64px;
    height: 64px;
    color: var(--danger);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px var(--danger-glow));
}

.error-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.error-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.retry-btn {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--primary-glow);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   Investigation Steps Timeline
   ============================================ */
.investigation-steps h3 svg {
    color: var(--primary);
}

.investigation-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.investigation-step {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 1rem;
    border-left: 2px solid var(--border);
}

.investigation-step:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.investigation-step::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-card-solid);
    box-shadow: 0 0 10px var(--primary-glow);
}

.investigation-step.completed::before {
    background: var(--success);
    box-shadow: 0 0 10px var(--success-glow);
}

.investigation-step.warning::before {
    background: var(--warning);
    box-shadow: 0 0 10px var(--warning-glow);
}

.investigation-step.danger::before {
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger-glow);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.step-number {
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.step-action {
    font-weight: 600;
    color: var(--text-primary);
}

.step-observation {
    background: var(--bg-card-solid);
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--primary);
}

.step-reasoning {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    padding-left: 0.75rem;
    border-left: 2px solid var(--primary);
}

/* ============================================
   Verdict Badge
   ============================================ */
.verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    border: 1px solid transparent;
}

.verdict-badge.safe {
    background: rgba(34, 197, 94, 0.15);
    color: var(--safe);
    border-color: rgba(34, 197, 94, 0.3);
}

.verdict-badge.low_risk {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.verdict-badge.moderate_risk {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

.verdict-badge.high_risk {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    border-color: rgba(249, 115, 22, 0.3);
}

.verdict-badge.dangerous, .verdict-badge.scam {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================
   Confidence Indicator
   ============================================ */
.confidence-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.confidence-bar {
    width: 100px;
    height: 6px;
    background: var(--bg-card-solid);
    border-radius: 3px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.confidence-fill.low {
    width: 33%;
    background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.confidence-fill.medium {
    width: 66%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.confidence-fill.high {
    width: 100%;
    background: linear-gradient(90deg, var(--success), #34d399);
}

/* ============================================
   AI Thinking Process Styles
   ============================================ */
.ai-thinking-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(99, 102, 241, 0.05));
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.ai-brain-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    color: var(--primary);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 5px var(--primary-glow)); }
    50% { filter: drop-shadow(0 0 15px var(--primary-glow)); }
}

.ai-thinking-title {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ai-thinking-title span:first-child {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-model-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px var(--primary-glow);
}

/* AI Thinking Timeline */
.ai-thinking-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    margin-left: 1rem;
}

.thinking-step {
    display: flex;
    gap: 1rem;
    position: relative;
    padding-bottom: 1.5rem;
    opacity: 0;
    animation: step-appear 0.5s ease forwards;
}

.thinking-step:last-child {
    padding-bottom: 0;
}

.thinking-step:nth-child(1) { animation-delay: 0.1s; }
.thinking-step:nth-child(2) { animation-delay: 0.2s; }
.thinking-step:nth-child(3) { animation-delay: 0.3s; }
.thinking-step:nth-child(4) { animation-delay: 0.4s; }
.thinking-step:nth-child(5) { animation-delay: 0.5s; }

@keyframes step-appear {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.thinking-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card-solid);
    border-radius: 50%;
    font-size: 1.25rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    border: 2px solid var(--border);
    transition: all var(--transition-normal);
}

.thinking-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 40px;
    width: 2px;
    height: calc(100% - 40px);
    background: linear-gradient(180deg, var(--primary), var(--border));
    opacity: 0.5;
}

.thinking-step-content {
    flex: 1;
    padding-top: 0.25rem;
}

.thinking-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.thinking-step-number {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}

.thinking-step-action {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.thinking-observation,
.thinking-step-observation {
    background: var(--bg-card-solid);
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-left: 3px solid var(--primary);
}

.thinking-conclusion {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.875rem;
    border-radius: 1rem;
    text-transform: capitalize;
}

.thinking-conclusion.safe,
.thinking-conclusion.sûr {
    background: rgba(34, 197, 94, 0.15);
    color: var(--safe);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.thinking-conclusion.safe::before,
.thinking-conclusion.sûr::before {
    content: '✓ ';
}

.thinking-conclusion.warning,
.thinking-conclusion.suspect,
.thinking-conclusion.suspicious {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.thinking-conclusion.warning::before,
.thinking-conclusion.suspect::before,
.thinking-conclusion.suspicious::before {
    content: '⚠ ';
}

.thinking-conclusion.danger,
.thinking-conclusion.dangereux,
.thinking-conclusion.dangerous {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.thinking-conclusion.danger::before,
.thinking-conclusion.dangereux::before,
.thinking-conclusion.dangerous::before {
    content: '✗ ';
}

/* Step icon colors */
.thinking-step.step-safe .thinking-step-icon,
.thinking-step.safe .thinking-step-icon {
    border-color: var(--safe);
    background: rgba(34, 197, 94, 0.1);
}

.thinking-step.step-warning .thinking-step-icon,
.thinking-step.warning .thinking-step-icon {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.thinking-step.step-danger .thinking-step-icon,
.thinking-step.danger .thinking-step-icon {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* AI Verdict Box */
.ai-verdict-box {
    background: var(--bg-card-solid);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.verdict-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.confidence-label {
    text-transform: capitalize;
    font-weight: 500;
}

/* No steps message */
.no-thinking-steps {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    background: var(--bg-card-solid);
    border-radius: var(--radius-lg);
}

/* Investigation Toggle Button */
.investigation-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    margin-top: 1rem;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.investigation-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.investigation-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-normal);
}

.investigation-toggle.expanded svg {
    transform: rotate(180deg);
}

/* ============================================
   Live AI Thoughts (during loading)
   ============================================ */
.live-ai-thoughts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 500px;
}

.live-thought {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card-solid);
    border-radius: var(--radius-md);
    animation: thought-appear 0.3s ease;
    border-left: 3px solid var(--primary);
}

.live-thought.safe {
    border-left-color: var(--safe);
}

.live-thought.warning {
    border-left-color: var(--warning);
}

.live-thought.danger {
    border-left-color: var(--danger);
}

@keyframes thought-appear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-thought-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.live-thought-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.live-thought-action {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.live-thought-conclusion {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-thought-conclusion.safe {
    color: var(--safe);
}

.live-thought-conclusion.warning {
    color: var(--warning);
}

.live-thought-conclusion.danger {
    color: var(--danger);
}

/* Scrollbar styling */
.live-ai-thoughts::-webkit-scrollbar {
    width: 6px;
}

.live-ai-thoughts::-webkit-scrollbar-track {
    background: var(--bg-card-solid);
    border-radius: 3px;
}

.live-ai-thoughts::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.live-ai-thoughts::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   Mobile Responsiveness
   ============================================ */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .shield-icon {
        width: 40px;
        height: 40px;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .input-wrapper {
        flex-direction: column;
        padding: 0.75rem;
        border-radius: var(--radius-lg);
    }

    .search-icon {
        display: none;
    }

    #urlInput {
        width: 100%;
        text-align: center;
        padding: 0.75rem;
    }

    .analyze-btn {
        width: 100%;
        margin-top: 0.75rem;
    }

    .score-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

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

    .risk-level {
        font-size: 1.5rem;
    }

    .tabs {
        justify-content: center;
    }

    .tab-btn {
        flex: 1;
        min-width: calc(50% - 0.5rem);
        text-align: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .info-table td:first-child {
        width: 45%;
    }

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

    /* AI Thinking mobile */
    .ai-thinking-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .ai-brain-icon {
        width: 40px;
        height: 40px;
    }

    .ai-thinking-timeline {
        margin-left: 0;
    }

    .thinking-step-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .thinking-step:not(:last-child)::before {
        left: 15px;
        top: 32px;
        height: calc(100% - 32px);
    }

    .thinking-step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .thinking-observation,
    .thinking-step-observation {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .verdict-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   Selection & Focus Styles
   ============================================ */
::selection {
    background: rgba(6, 182, 212, 0.3);
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
