:root {
    --primary: #2563eb;       /* Modern vibrant blue */
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff; /* Background for active items */
    --text-main: #1e293b;     /* Slate 800 */
    --text-muted: #64748b;    /* Slate 500 */
    --bg-page: #f8fafc;       /* Slate 50 */
    --bg-card: #ffffff;
    --border: #e2e8f0;        /* Slate 200 */
    --border-hover: #cbd5e1;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    margin: 0;
    padding: 40px 20px;
    line-height: 1.5;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Typography */
header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--text-main);
}

/* Upload Section */
.upload-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.2s;
    background-color: var(--bg-page);
    position: relative;
}

.upload-zone:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.hidden-file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 12px;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 8px 0;
}

.browse-link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

.file-name-display {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

/* Lens Grid (Mockup Implementation) */
.lens-section {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.lens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.tab-btn {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tab-btn:hover:not(.active) {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tab-btn.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); /* Soft glow */
}

.lens-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.tab-btn.active .lens-title {
    color: var(--primary);
}

.lens-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Buttons */
.primary-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.primary-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.primary-btn:disabled {
    background-color: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.secondary-btn {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.secondary-btn:hover {
    background-color: var(--bg-page);
    border-color: var(--text-muted);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

/* Utilities */
.hidden { display: none !important; }

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.highlight-text {
    font-weight: 700;
    color: var(--primary);
    text-transform: capitalize;
}

.sub-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.spinner {
    border: 4px solid var(--primary-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: var(--primary);
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Output */
.results-section {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

/* Markdown Table Styling */
.review-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95rem;
}

.review-content th, .review-content td {
    border: 1px solid var(--border);
    padding: 12px 16px;
    text-align: left;
}

.review-content th {
    background-color: var(--bg-page);
    font-weight: 600;
    color: var(--text-main);
}

.review-content tr:nth-child(even) {
    background-color: var(--bg-page);
}