:root {
    --bg-main: #fcfcfc;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --text-main: #111827;
    --text-muted: #6b7280;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 4rem 1rem;
    line-height: 1.5;
}

.container {
    max-width: 900px;
    width: 100%;
}

header {
    text-align: left;
    margin-bottom: 3.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    line-height: 1.6;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

#drop-zone {
    border: 2px dashed var(--border-color);
    cursor: pointer;
    text-align: center;
    background: #ffffff; /* pure white */
    padding: 4rem 2rem;
}

#drop-zone:hover, #drop-zone.dragover {
    border-color: var(--accent);
    background: #f9fafb;
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.upload-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 600;
}

.upload-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-primary {
    background: var(--text-main);
    color: white;
}

.btn-primary:hover {
    background: #1f2937;
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-glow {
    background: var(--accent);
    color: white;
}

.btn-glow:hover {
    background: var(--accent-hover);
}

.expert-form-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.form-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.form-group input {
    width: 100%;
    padding: 0.625rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-main);
    background: #fcfcfc;
    transition: border-color 0.15s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
}

.actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 2.5rem;
    gap: 1.25rem;
}

.result-section {
    margin-top: 4rem;
}

.result-card {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.card-header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.text-output {
    padding: 4rem; /* More white space as requested */
    background: white;
    color: var(--text-main);
}

/* Report Preview Styling */
.text-output h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 700;
    color: var(--text-main);
}

.text-output h3 {
    color: var(--text-main);
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.text-output p {
    margin-bottom: 2rem; /* Even more space between paragraphs */
    line-height: 1.9;    /* More breathing room */
    color: #374151;
    font-size: 1.05rem;
}

.report-meta {
    background: #f9fafb;
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 4rem;
    border: 1px solid var(--border-color);
}

.report-meta p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-main);
}

.report-meta p strong {
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 0.5rem;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.report-table td {
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.report-table tr:first-child {
    background: #f9fafb;
    font-weight: 600;
    color: var(--text-main);
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: var(--text-main);
    animation: spin 0.8s linear infinite;
    margin-bottom: 1.5rem;
}

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

.hidden { display: none !important; }

.evidence-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.evidence-img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
    cursor: zoom-in;
}

.evidence-img:hover {
    transform: scale(1.02);
}

@media (max-width: 850px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    body { padding: 2rem 1rem; }
    h1 { font-size: 1.75rem; }
    .glass-card { padding: 1.5rem; }
    .text-output { padding: 2rem 1.5rem; }
}
