/* Custom CSS for OJS XML Indexer - Light/Glassmorphism theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(0, 0, 0, 0.06);
    --card-border-hover: rgba(99, 102, 241, 0.3);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --secondary-grad: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --glow-shadow: 0 10px 25px rgba(99, 102, 241, 0.08);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary-grad);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.btn-secondary {
    background: #f1f5f9;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: #e2e8f0;
    box-shadow: none;
    transform: none;
}

/* Cards & Glassmorphism */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    border-color: var(--card-border-hover);
    box-shadow: var(--glow-shadow), 0 20px 40px rgba(15, 23, 42, 0.08);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.badge-secondary {
    background: rgba(13, 148, 136, 0.08);
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.15);
}

.badge-muted {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(22, 163, 74, 0.08);
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.15);
}

.alert-danger {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.15);
}

/* Grid system */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: #ffffff;
}

/* Dropzone style */
.dropzone {
    border: 2px dashed rgba(79, 70, 229, 0.2);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.4);
}

.dropzone:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.03);
}

.dropzone-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Table / List layout */
.article-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.article-title:hover {
    color: var(--primary);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    align-items: center;
}

.article-authors {
    font-weight: 500;
    color: var(--primary);
}

.article-abstract {
    color: var(--text-secondary);
    font-size: 0.925rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0.5rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #f1f5f9;
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.pagination .active {
    background: var(--primary-grad);
    color: #fff;
    border-color: transparent;
}

/* Detail page styling */
.detail-header {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.author-block {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.author-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.author-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.author-aff {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.detail-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.abstract-text {
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: justify;
}

/* Search bar styling */
.filter-bar {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .filter-bar {
        grid-template-columns: 1fr;
    }
}
