* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; background: #F5F5F5; color: #1a3a2a; line-height: 1.5; padding: 24px 20px; }
.app-container { max-width: 1600px; margin: 0 auto; }

.hero {
    background: #FFFFFF;
    border: 6px solid #a3c4a3;
    border-radius: 28px;
    padding: 13px 46px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.hero-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}
.user-logo {
    max-width: 600px;
    width: 100%;
    height: auto;
    display: block;
}
.last-updated-card {
    background: #e8f5e8;
    border: 1px solid #6b8c6b;
    border-radius: 40px;
    padding: 5px 16px;
    text-align: center;
    min-width: 170px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.last-updated-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #2a5a2a;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.last-updated-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2a5a2a;
    letter-spacing: 0.5px;
}
.last-updated-time {
    font-size: 0.8rem;
    color: #4a7a4a;
}
.golden-line {
    border-top: 2px solid #4a6b4a;
    margin: 12px 0 16px 0;
}
.hero-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.open-access-text {
    color: #2a5a2a;
    font-size: 0.90rem;
    border-left: 3px solid #FFFFFF;
    padding-left: 1rem;
}
.author-name {
    font-size: 0.90rem;
    white-space: nowrap;
}
.author-name a {
    color: #2ecc71;
    text-decoration: none;
    font-weight: 600;
}
.author-name a:hover {
    text-decoration: underline;
    color: #27ae60;
}

.search-container {
    background: white;
    padding: 12px 28px;
    border-radius: 24px;
    margin-bottom: 28px;
    border: 1px solid #a3c4a3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
#searchBox { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; justify-content: space-between; align-items: center; }
.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    flex: 1;
}
.filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.filter-item label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #4a7a4a;
}
.filter-item select, .filter-item input {
    padding: 8px 12px;
    border: 1px solid #6b9e6b;
    border-radius: 40px;
    font-size: 0.8rem;
    background: white;
    font-family: inherit;
}
.search-btn {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.search-btn:hover { background: #27ae60; transform: translateY(-1px); }
.refresh-btn {
    background: #1abc9c;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.refresh-btn:hover { background: #16a085; transform: translateY(-1px); }
.reset-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.reset-btn:hover { background: #c0392b; transform: translateY(-1px); }

.skeleton {
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-title {
    height: 18px;
    width: 85%;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 4px;
}
.skeleton-title.short { width: 60%; }
.skeleton-title.medium { width: 75%; }
.skeleton-journal {
    height: 16px;
    width: 70%;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 4px;
}
.skeleton-year {
    height: 24px;
    width: 40px;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 20px;
    margin: 0 auto;
}
.skeleton-cloud {
    width: 100%;
    height: 140px;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
}
.skeleton-cloud-word {
    height: 24px;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 20px;
    display: inline-block;
}
.skeleton-cloud-word.small { width: 60px; height: 20px; }
.skeleton-cloud-word.medium { width: 90px; height: 28px; }
.skeleton-cloud-word.large { width: 120px; height: 36px; }
.skeleton-filter {
    height: 28px;
    width: 100px;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 20px;
}

.chart-container {
    position: relative;
    width: 100%;
    min-height: 200px;
}
.skeleton-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}
.skeleton-chart-bar {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    height: 150px;
    width: 100%;
    padding: 16px;
}
.skeleton-chart-bar-item {
    width: 40px;
    height: 60px;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 4px;
}
.skeleton-chart-donut {
    width: 120px;
    height: 120px;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    border-radius: 50%;
}

.clouds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}
.cloud-card {
    background: white;
    border: 2px solid #6b9e6b;
    border-radius: 20px;
    padding: 12px 16px;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.cloud-card h3 {
    color: #2c5e2c;
    margin-bottom: 10px;
    font-size: 0.9rem;
    border-left: 3px solid #8bc48b;
    padding-left: 10px;
}
.cloud-badge {
    font-size: 0.6rem;
    background: #e8f5e8;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    font-weight: normal;
    color: #4a7a4a;
}
.wordcloud-wrapper {
    width: 100%;
    height: 160px;
    background: #fafcff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}
canvas.wordcloud-canvas { width: 100%; height: auto; max-width: 100%; max-height: 150px; object-fit: contain; }
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #7a9e7a;
    font-size: 0.8rem;
    text-align: center;
    width: 100%;
    height: 100%;
}

.tops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}
.top-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 12px 16px;
    border: 2px solid #6b9e6b;
    min-height: 260px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.top-card h3 {
    color: #2c5e2c;
    margin-bottom: 12px;
    font-size: 0.9rem;
    border-left: 3px solid #8bc48b;
    padding-left: 10px;
    font-weight: 600;
}
.chart-container {
    width: 100%;
    min-height: 200px;
    position: relative;
}
canvas.chart-canvas {
    max-height: 200px;
    width: 100%;
}

.query-section {
    background: white;
    border: 2px solid #6b9e6b;
    border-radius: 28px;
    margin-bottom: 28px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.section-header {
    background: #f0faf0;
    padding: 12px 20px 8px 20px;
    border-bottom: 2px solid #d6e8d6;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.section-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c5e2c;
    letter-spacing: -0.2px;
}
.section-header .badge {
    background: #e8f5e8;
    border: 1px solid #6b8c6b;
    padding: 4px 10px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #2a5a2a;
}
.column-filters {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 20px 10px 20px;
    justify-content: space-between;
}
.filters-left {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}
.filter-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fc;
    padding: 0.15rem 0.8rem;
    border-radius: 40px;
    border: 1px solid #6b8c6b;
    font-size: 0.65rem;
}
.filter-group label {
    font-weight: 600;
    color: #6b9e6b;
    font-size: 0.65rem;
}
.filter-select {
    background: white;
    border: none;
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
    border-radius: 20px;
    font-weight: 500;
    color: #4a7a4a;
    cursor: pointer;
    outline: none;
    font-family: inherit;
}
.reset-filters {
    background: #f1f5f9;
    border: 1px solid #6b8c6b;
    padding: 0.15rem 0.8rem;
    border-radius: 40px;
    font-size: 0.6rem;
    font-weight: 500;
    color: #000000;
    cursor: pointer;
    transition: 0.15s;
}
.reset-filters:hover { background: #e6edf5; border-color: #9bb7cf; }
.search-word-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fc;
    padding: 0.15rem 0.8rem;
    border-radius: 40px;
    border: 1px solid #6b8c6b;
}
.search-word-input {
    border: none;
    background: transparent;
    font-size: 0.65rem;
    padding: 0.15rem 0;
    width: 110px;
    outline: none;
    font-family: inherit;
}
.search-word-input::placeholder {
    color: #aaa;
    font-size: 0.6rem;
}
.search-word-apply {
    background: #6b9e6b;
    border: none;
    font-size: 0.6rem;
    color: white;
    padding: 0.1rem 0.6rem;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.15s;
}
.search-word-apply:hover {
    background: #4a7a4a;
}
.search-word-reset {
    background: #e74c3c;
    border: none;
    font-size: 0.6rem;
    color: white;
    padding: 0.1rem 0.6rem;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.15s;
    margin-left: 2px;
}
.search-word-reset:hover {
    background: #c0392b;
}
.export-buttons {
    display: flex;
    gap: 6px;
}
.export-btn {
    border: none;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.15rem 0.8rem;
    border-radius: 40px;
    cursor: pointer;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.15s;
}
.export-btn.csv {
    background: #6b9e6b;
}
.export-btn.csv:hover {
    background: #4a7a4a;
}
.export-btn.ris {
    background: #f59e0b;
}
.export-btn.ris:hover {
    background: #d97706;
}
.export-btn.gexf {
    background: #8b5cf6;
}
.export-btn.gexf:hover {
    background: #7c3aed;
}

.table-wrapper { overflow-x: auto; padding: 0; }
.paper-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 700px;
    table-layout: fixed;
}
.paper-table th {
    text-align: left;
    padding: 8px 12px;
    background-color: #27ae60;
    font-weight: 700;
    color: white;
    border-bottom: 2px solid #d0dbe8;
    font-size: 0.75rem;
}
.paper-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e9edf2;
    vertical-align: top;
}
.paper-table tr:hover { background-color: #eafaf1; }

.paper-table th:nth-child(1), .paper-table td:nth-child(1) { width: 35%; }
.paper-table th:nth-child(2), .paper-table td:nth-child(2) { width: 25%; }
.paper-table th:nth-child(3), .paper-table td:nth-child(3) { width: 10%; }
.paper-table th:nth-child(4), .paper-table td:nth-child(4) { width: 10%; }

.title-cell { font-weight: 400; color: #0a2a1a; word-break: break-word; font-size: 0.75rem; }
.journal-cell {
    font-weight: 400;
    color: #0a2a1a;
    font-size: 0.7rem;
    word-break: break-word;
}
.year-cell { font-weight: 400; text-align: center; color: #0a2a1a; font-size: 0.7rem; }
.doi-link {
    font-family: 'SF Mono', monospace;
    font-size: 0.65rem;
    background: #f2f5f9;
    padding: 2px 8px;
    border-radius: 20px;
    text-decoration: none;
    color: #1e8449;
    display: inline-block;
    font-weight: 500;
}
.doi-link:hover { background: #e6edf5; text-decoration: underline; }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 16px;
    background: #ffffff;
    border-top: 1px solid #eef2f6;
}
.pagination button {
    background: #6b9e6b;
    border: 1px solid #4a7a4a;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
    color: white;
}
.pagination button:disabled {
    background: #b8d0b8;
    opacity: 0.6;
    cursor: not-allowed;
}
.pagination button:hover:not(:disabled) {
    background: #4a7a4a;
    transform: translateY(-1px);
}
.page-indicator {
    background: #eef2f7;
    border: 1px solid #6b8c6b;
    padding: 5px 16px;
    border-radius: 32px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b9e6b;
}

.custom-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #6b8c6b;
}
.footer-line1 {
    font-size: 0.95rem;
    color: #2a5a2a;
    margin-bottom: 6px;
    font-weight: 500;
}
.footer-line1 a {
    color: #6b9e6b;
    text-decoration: none;
    font-weight: 600;
}
.footer-line1 a:hover {
    text-decoration: underline;
    color: #4a7a4a;
}
.footer-line2 {
    font-size: 0.75rem;
    color: #3e3942;
    line-height: 1.4;
    max-width: 900px;
    margin: 0 auto 12px auto;
}
.footer-callout {
    background: #f0faf0;
    border-left: 5px solid #6b9e6b;
    border-radius: 14px;
    padding: 10px 16px;
    max-width: 620px;
    margin: 10px auto 0 auto;
    text-align: center;
}
.callout-text {
    font-size: 0.75rem;
    color: #4a7a4a;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.callout-text a {
    color: #6b9e6b;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px dashed #b8d0b8;
}
.callout-text a:hover {
    color: #2a5a2a;
    border-bottom: 1px solid #2a5a2a;
}
.callout-icon { font-size: 1rem; }

@media (max-width: 1100px) {
    .column-filters { flex-direction: column; align-items: stretch; }
    .filters-left { justify-content: center; }
}
@media (max-width: 750px) {
    body { padding: 12px; }
    .hero { padding: 8px 20px; }
    .hero-top-row { flex-direction: column; align-items: flex-start; }
    .last-updated-card { align-self: flex-start; }
    .hero-bottom-row { flex-direction: column; align-items: flex-start; }
    .author-name { white-space: normal; }
    .user-logo { max-width: 260px; }
    .filters-row { flex-direction: column; align-items: stretch; }
    .clouds-grid { grid-template-columns: 1fr; gap: 14px; }
    .tops-grid { grid-template-columns: 1fr; gap: 14px; }
    .section-header h2 { font-size: 0.9rem; }
    .pagination button { padding: 4px 10px; font-size: 0.65rem; }
    .search-word-input { width: 80px; }
    .top-card { min-height: 220px; }
    .chart-container { min-height: 180px; }
}