* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #fafafa;
    color: #333;
    line-height: 1.6;
}

.navbar {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.logo img {
    height: 40px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-link {
    padding: 8px 16px;
    background: #ff9933;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.home-link:hover {
    background: #e68a2e;
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.date-input:focus {
    outline: none;
    border-color: #ff9933;
}

/* HEADER */
.header {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    padding: 50px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 153, 51, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.header img {
    width: 280px;
    max-width: 90%;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    animation: fadeInDown 0.8s ease-out;
    position: relative;
    z-index: 1;
}

.header h1 {
    font-size: 42px;
    color: #1a1a1a;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 22px;
    font-weight: 600;
    color: #ff9933;
    font-style: italic;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out 0.4s both;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MAIN CONTENT */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.papers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* CARD */
.paper-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.paper-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.card-date {
    font-size: 13px;
    color: #666;
}

.read-btn {
    padding: 8px 16px;
    background: #ff9933;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.read-btn:hover {
    background: #e68a2e;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-state h3 {
    font-size: 20px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: #666;
}

/* LOADING */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #ff9933;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* PDF MODAL */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.pdf-modal.active {
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    padding: 8px 16px;
    background: #ff9933;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.modal-btn:hover {
    background: #e68a2e;
}

.close-modal {
    background: #dc3545;
}

.close-modal:hover {
    background: #c82333;
}

.modal-body {
    flex: 1;
    padding: 20px;
}

.pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .papers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 16px;
    }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }

    .header img {
        width: 200px;
        margin-bottom: 15px;
    }

    .header h1 {
        font-size: 28px;
    }

    .header p {
        font-size: 18px;
    }

    .papers-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .main {
        padding: 30px 16px;
    }

    .card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .read-btn {
        width: 100%;
    }

    .modal-header {
        flex-direction: column;
        gap: 12px;
    }

    .modal-actions {
        width: 100%;
        justify-content: space-between;
    }

    .modal-body {
        padding: 12px;
    }
}