
  /* Modern Dark Theme Styles */
:root {
    --primary: #6d28d9;
    --primary-light: #8b5cf6;
    --secondary: #a78bfa;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --accent: #06b6d4;
    --transition: all 0.3s ease;
    --blur: blur(10px);
}

/* Light Theme Variables */
[data-theme="light"] {
    --primary: #6d28d9;
    --primary-light: #8b5cf6;
    --secondary: #7c3aed;
    --dark: #f8fafc;
    --dark-light: #e2e8f0;
    --light: #0f172a;
    --accent: #0891b2;
}

/* System preference detection */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --primary: #6d28d9;
        --primary-light: #8b5cf6;
        --secondary: #7c3aed;
        --dark: #f8fafc;
        --dark-light: #e2e8f0;
        --light: #0f172a;
        --accent: #0891b2;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@supports (font-variation-settings: normal) {
    * {
        font-family: 'Inter var', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
}

body {
    background: linear-gradient(to bottom right, var(--dark), var(--dark-light));
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth page load animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    animation: fadeIn 0.8s ease-out;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header with blur effect */
header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] header {
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    filter: drop-shadow(0 0 5px rgba(109, 40, 217, 0.5));
}

.logo-text {
    font-weight: 700;
    color: var(--light);
    font-size: 1.2rem;
}

.logo-text span {
    color: var(--primary-light);
    background: linear-gradient(to right, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav a {
    color: var(--light);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-light), var(--accent));
    transition: var(--transition);
}

nav a:hover {
    color: var(--secondary);
}

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.papers-hero {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: var(--light);
    padding: 140px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.papers-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.papers-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.papers-hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-light), var(--accent));
    border-radius: 2px;
}

.papers-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Papers Section */
.papers-main {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--light);
    font-size: 2.2rem;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-light), var(--accent));
    border-radius: 2px;
}

/* Filter Section */
.filter-section {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

[data-theme="light"] .filter-section {
    background: rgba(226, 232, 240, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.filter-section:hover {
    box-shadow: 0 10px 40px rgba(109, 40, 217, 0.2);
    transform: translateY(-5px);
}

.filter-title {
    margin-bottom: 25px;
    color: var(--light);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-title i {
    color: var(--accent);
    font-size: 1.2rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--secondary);
}

.filter-select, .search-input {
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    color: var(--light);
}

[data-theme="light"] .filter-select,
[data-theme="light"] .search-input {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--light);
}

.filter-select:focus, .search-input:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.3);
    background: rgba(15, 23, 42, 0.8);
}

[data-theme="light"] .filter-select:focus,
[data-theme="light"] .search-input:focus {
    background: rgba(248, 250, 252, 0.95);
}

.search-container {
    position: relative;
}

.search-container i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 15px;
}

.filter-btn {
    padding: 12px 24px;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.3);
}

.filter-btn.clear {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    color: var(--light);
}

[data-theme="light"] .filter-btn.clear {
    background: rgba(0, 0, 0, 0.1);
    color: var(--light);
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(109, 40, 217, 0.4);
}

.filter-btn.clear:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .filter-btn.clear:hover {
    background: rgba(0, 0, 0, 0.15);
}

.course-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 15px;
}

.tab-btn {
    padding: 12px 30px;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

[data-theme="light"] .tab-btn {
    background: rgba(226, 232, 240, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.tab-btn.active, .tab-btn:hover {
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.3);
    transform: translateY(-3px);
}

.semester-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.semester-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 1;
    transform: translateY(0);
}

[data-theme="light"] .semester-card {
    background: rgba(226, 232, 240, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.semester-card.hidden {
    display: none;
}

.semester-card.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

.semester-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(109, 40, 217, 0.25);
}

.semester-header {
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    color: white;
    padding: 20px;
    text-align: center;
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.semester-year {
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
}

.papers-list {
    padding: 20px;
}

.paper-item {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

[data-theme="light"] .paper-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.paper-item:last-child {
    border-bottom: none;
}

.paper-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

[data-theme="light"] .paper-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.paper-name {
    color: var(--light);
    font-weight: 500;
    flex: 1;
}

.paper-year {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-right: 12px;
    background: rgba(109, 40, 217, 0.2);
    padding: 5px 10px;
    border-radius: 6px;
}

[data-theme="light"] .paper-year {
    background: rgba(109, 40, 217, 0.1);
}

.download-btn {
    padding: 8px 18px;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(109, 40, 217, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(109, 40, 217, 0.4);
}

.no-results {
    text-align: center;
    padding: 50px;
    color: var(--secondary);
    grid-column: 1 / -1;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 16px;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}

[data-theme="light"] .no-results {
    background: rgba(226, 232, 240, 0.7);
}

.no-results i {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--primary-light);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 70px 0 0;
    position: relative;
}

[data-theme="light"] footer {
    background: var(--dark-light);
    color: var(--light);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-light), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-about p {
    color: #cbd5e1;
    margin-bottom: 20px;
    line-height: 1.8;
}

[data-theme="light"] .footer-about p {
    color: #475569;
}

.footer-links h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--light);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

[data-theme="light"] .footer-links a {
    color: #475569;
}

.footer-links a:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

[data-theme="light"] .footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #64748b;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: translateY(-5px) rotate(15deg);
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.4);
}

/* Responsive Design */
@media (max-width: 992px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .papers-hero {
        padding: 120px 0 50px;
    }
    
    .papers-hero h1 {
        font-size: 2.2rem;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .semester-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .paper-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .paper-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        justify-content: space-between;
    }
    
    nav {
        display: none;
    }
}

@media (max-width: 576px) {
    .papers-hero h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .semester-grid {
        grid-template-columns: 1fr;
    }
    
    .course-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    nav {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: var(--blur);
        -webkit-backdrop-filter: var(--blur);
        flex-direction: column;
        padding: 40px 20px;
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    [data-theme="light"] nav {
        background: rgba(248, 250, 252, 0.95);
    }
    
    nav.active {
        right: 0;
    }
    
    nav a {
        margin: 15px 0;
        font-size: 1.2rem;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }
    
    [data-theme="light"] nav a {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    nav a:last-child {
        border-bottom: none;
    }
    
    nav a::after {
        display: none;
    }
}

/* Animation for filter section */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-section {
    animation: fadeInUp 0.5s ease-out;
}

/* Animation for cards */
.semester-card {
    animation: fadeInUp 0.6s ease-out;
}

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

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

[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--dark-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--primary-light));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary-light), var(--accent));
}
