/* Publications Page Styles */

.publications-page {
    background: var(--bg-light);
    padding-bottom: 80px;
}

/* Statistics Section */
.publication-stats {
    padding: 60px 0;
    background: var(--bg-white);
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--gradient-primary);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 3em;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Controls Section */
.publications-controls {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--lighter-slate);
    background: transparent;
    color: var(--text-medium);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
}

.search-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 300px;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid var(--lighter-slate);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-slate);
    font-size: 1.2em;
}

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

.sort-group label {
    font-weight: 500;
    color: var(--text-medium);
    white-space: nowrap;
}

.sort-group select {
    padding: 10px 35px 10px 15px;
    border: 2px solid var(--lighter-slate);
    border-radius: 8px;
    background: #fff;
    color: var(--text-dark);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.sort-group select:focus {
    outline: none;
    border-color: var(--primary-purple);
}

/* Publications Container */
#publications-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Publication Card */
.publication-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.publication-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-left-color: var(--primary-purple);
}

.pub-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.pub-title {
    flex: 1;
    margin: 0;
    font-size: 1.3em;
    line-height: 1.4;
}

.pub-title a {
    color: var(--primary-slate);
    text-decoration: none;
    transition: color 0.3s ease;
}

.pub-title a:hover {
    color: var(--primary-purple);
}

.author-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.author-badge.first-author {
    background: var(--gradient-primary);
    color: #fff;
}

.author-badge.co-author {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-purple);
}

.pub-authors {
    font-size: 0.95em;
    color: var(--text-medium);
    margin-bottom: 15px;
    line-height: 1.6;
}

.author-highlight {
    color: var(--primary-purple);
    font-weight: 600;
}

.pub-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pub-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: var(--text-light);
}

.pub-meta i {
    color: var(--primary-coral);
}

.pub-abstract {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.pub-abstract.collapsed {
    max-height: 0;
    padding: 0 20px;
    margin: 0;
}

.pub-abstract p {
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--text-medium);
    margin: 0;
}

.pub-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-expand,
.btn-ads {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-expand {
    background: transparent;
    border: 2px solid var(--lighter-slate);
    color: var(--text-medium);
}

.btn-expand:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

.btn-ads {
    background: var(--gradient-primary);
    border: 2px solid transparent;
    color: #fff;
}

.btn-ads:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.skeleton {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 15px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-title {
    width: 80%;
    height: 24px;
}

.skeleton-authors {
    width: 60%;
}

.skeleton-journal {
    width: 40%;
}

/* Empty/Error States */
.no-results,
.error-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-results i,
.error-state i {
    font-size: 4em;
    color: var(--lighter-slate);
    margin-bottom: 20px;
}

.no-results h3,
.error-state h3 {
    color: var(--primary-slate);
    margin-bottom: 10px;
}

.no-results p,
.error-state p {
    color: var(--text-light);
    font-size: 1.1em;
}

.btn-retry {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-group {
        min-width: 100%;
    }

    .pub-header {
        flex-direction: column;
    }

    .pub-meta {
        flex-direction: column;
        gap: 10px;
    }

    .stat-number {
        font-size: 2.5em;
    }
}
