/* CitationLint - Styles */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --warning: #ca8a04;
    --warning-bg: #fef9c3;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px 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);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ghostwriter-style logo - script font like the PBS show */
.logo {
    font-family: 'Pacifico', cursive;
    font-size: 4rem;
    font-weight: normal;
    letter-spacing: 1px;
}

.logo-ghost {
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff,
        0 0 40px #00aaaa,
        2px 2px 4px rgba(0,0,0,0.3);
    animation: ghostGlow 2s ease-in-out infinite alternate;
}

.logo-ref {
    color: #ffffff;
    text-shadow: 
        0 0 5px #ffffff,
        0 0 10px #00ffff,
        2px 2px 4px rgba(0,0,0,0.3);
}

@keyframes ghostGlow {
    from {
        text-shadow: 
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 30px #00ffff,
            0 0 40px #00aaaa,
            2px 2px 4px rgba(0,0,0,0.3);
    }
    to {
        text-shadow: 
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 30px #00aaaa,
            2px 2px 4px rgba(0,0,0,0.3);
    }
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

.privacy-note {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.drop-zone-content {
    pointer-events: none;
}

.btn-browse {
    pointer-events: auto;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary);
    background: white;
    border: 2px solid var(--primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-browse:hover {
    background: var(--primary);
    color: white;
}

.drop-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.drop-zone p {
    color: var(--gray-600);
    margin: 0.25rem 0;
}

.drop-hint {
    font-size: 0.875rem;
    color: var(--gray-400);
}

/* File Info */
.file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.file-name {
    font-weight: 500;
    color: var(--gray-700);
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-icon {
    padding: 0.25rem 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 1.25rem;
}

.btn-icon:hover {
    color: var(--gray-600);
}

/* Progress */
.progress-content {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.progress-detail {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    font-family: monospace;
    word-break: break-all;
}

/* Results */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-header h2 {
    font-size: 1.25rem;
    color: var(--gray-800);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.stat-card.stat-valid {
    background: var(--success-bg);
}

.stat-card.stat-invalid {
    background: var(--danger-bg);
}

.stat-card.stat-unverified {
    background: var(--warning-bg);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-valid .stat-number {
    color: var(--success);
}

.stat-invalid .stat-number {
    color: var(--danger);
}

.stat-unverified .stat-number {
    color: var(--warning);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.filter-btn.active {
    background: var(--primary);
    color: white;
}

/* Citations List */
.citations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
}

.citation-item {
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--gray-300);
    background: var(--gray-50);
}

.citation-item.valid {
    border-left-color: var(--success);
    background: var(--success-bg);
}

.citation-item.invalid {
    border-left-color: var(--danger);
    background: var(--danger-bg);
}

.citation-item.error {
    border-left-color: var(--warning);
    background: var(--warning-bg);
}

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

.status-icon {
    font-weight: bold;
}

.citation-item.valid .status-icon {
    color: var(--success);
}

.citation-item.invalid .status-icon {
    color: var(--danger);
}

.citation-item.error .status-icon {
    color: var(--warning);
}

.status-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.citation-doi {
    font-family: monospace;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.citation-doi a {
    color: var(--primary);
    text-decoration: none;
}

.citation-doi a:hover {
    text-decoration: underline;
}

.citation-details {
    font-size: 0.875rem;
}

.citation-title {
    font-weight: 500;
    color: var(--gray-800);
}

.citation-meta {
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.citation-error {
    color: var(--danger);
}

.citation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.citation-index {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 600;
}

.citation-raw {
    font-size: 0.8rem;
    color: var(--gray-600);
    background: rgba(0,0,0,0.05);
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-family: serif;
}

.citation-searched {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-style: italic;
    margin-top: 0.25rem;
}

.similarity {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-left: 0.5rem;
}

.method-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 600;
}

.method-badge.doi {
    background: var(--success-bg);
    color: var(--success);
}

.method-badge.title {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* Error Card */
.error-card {
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.875rem;
    margin-top: 2rem;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.support-link {
    margin: 1rem 0;
}

.bmc-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #ffdd00;
    color: #000 !important;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bmc-button:hover {
    background: #ffcc00;
    transform: translateY(-2px);
    text-decoration: none !important;
}

.version {
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 1rem;
    font-family: monospace;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Scrollbar */
.citations-list::-webkit-scrollbar {
    width: 8px;
}

.citations-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.citations-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.citations-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}
