* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #eee;
}

header {
    text-align: center;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

header h1 {
    font-size: 2rem;
    letter-spacing: 2px;
}

header p {
    margin-top: 8px;
    color: #aaa;
    font-size: 0.9rem;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
        
.logo-img:hover {
    transform: scale(1.05);
}
        
@media (max-width: 768px) {
    .logo-img {
        width: 32px;
        height: 32px;
    }
}

#map-container {
    background: #0a0a2a;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

#world-map {
    height: 600px;
    width: 100%;
}

/* Leaflet customizations */
.leaflet-container {
    background: #0a0a2a;
}

.leaflet-popup-content-wrapper {
    background: #1e1e3a;
    color: #eee;
    border-radius: 12px;
}

.leaflet-popup-tip {
    background: #1e1e3a;
}

.country-circle {
    fill: #e74c3c;
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
    transition: r 0.3s, fill 0.3s;
}

.country-circle:hover {
    fill: #ff6b6b;
    r: 10;
}

.continent-label {
    fill: #fff;
    font-size: 14px;
    font-weight: bold;
    text-anchor: middle;
    cursor: pointer;
    transition: fill 0.3s;
}

.continent-label:hover {
    fill: #e74c3c;
}

/* News Section */
#news-section {
    background: rgba(30, 30, 58, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
}

#news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e74c3c;
}

#selected-country {
    font-size: 1.5rem;
    color: #e74c3c;
}

.back-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #c0392b;
}

#news-list {
    max-height: 400px;
    overflow-y: auto;
}

.hint {
    text-align: center;
    color: #aaa;
    padding: 40px;
}

.news-item {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.news-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
    border-left-color: #e74c3c;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #aaa;
    flex-wrap: wrap;
}

.news-source {
    color: #e74c3c;
}

.news-date {
    color: #6c6c8a;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1e1e3a;
    margin: 5% auto;
    padding: 0;
    width: 80%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 20px;
    overflow: auto;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 15px 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #e74c3c;
}

#modal-news-content {
    padding: 0 30px 30px 30px;
}

.modal-news-full {
    line-height: 1.8;
}

.modal-news-full h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.modal-news-full p {
    margin-bottom: 15px;
}

.modal-news-full .news-link {
    display: inline-block;
    margin-top: 20px;
    color: #e74c3c;
    text-decoration: none;
}

.modal-news-full .news-link:hover {
    text-decoration: underline;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e1e3a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-tabs {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .category-tab {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .news-title {
        font-size: 14px;
    }
    
    .news-meta {
        font-size: 10px;
        gap: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .language-selector, .membership-btn {
        width: 100%;
        text-align: center;
    }
    
    .payment-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    body {
        background: #0a0a1a;
    }
}

/* Loading animation */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: "📰";
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 优化滚动行为 */
html {
    scroll-behavior: smooth;
}

/* 改善地图和新闻区域之间的过渡 */
#news-section {
    transition: all 0.3s ease;
}

/* 添加一个可视的滚动提示 */
.scroll-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    animation: bounce 2s infinite;
    backdrop-filter: blur(5px);
    display: none;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.scroll-hint.show {
    display: block;
}

/* 改善鼠标移动体验 - 增加地图容器的 padding */
#map-container {
    margin-bottom: 30px;
    cursor: grab;
}

#map-container:active {
    cursor: grabbing;
}

/* 新闻项悬停效果增强 */
.news-item {
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, border-left-color 0.2s;
}

.news-item:hover {
    transform: translateX(8px);
}

/* Login Modal Styles */
#login-modal input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#login-modal button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#login-modal button:hover {
    background: #0056b3;
}

.login-btn, .logout-btn {
    padding: 8px 16px;
    margin-left: 10px;
    cursor: pointer;
}

/* Header Styles */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

#premium-user-panel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.days-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.renew-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.renew-btn:hover {
    background: #f57c00;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
}

.upgrade-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* Modal Styles */
#signup-fields input,
#signup-fields small {
    width: 100%;
    margin: 8px 0;
}

#signup-fields input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.pay-now-btn {
    width: 100%;
    padding: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.pay-now-btn:hover {
    background: #218838;
}

.save-badge {
    background: #28a745;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.close-modal {
    float: right;
    font-size: 28px;
    cursor: pointer;
}