/* Base styles */
:root {
    --primary-color: #4e54c8;
    --primary-gradient: linear-gradient(45deg, #4e54c8, #8f94fb);
    --secondary-color: #ff7676;
    --text-color: #333;
    --background-color: #f9f9f9;
    --card-bg: #fff;
    --border-radius: 12px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hidden {
    display: none !important;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

/* Title container with flex layout */
.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.main-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

/* Chinese title - primary */
.title-chinese {
    font-size: 3rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 4px rgba(78, 84, 200, 0.1);
}

/* English title - secondary */
.title-english {
    font-size: 1.4rem;
    font-weight: 600;
    color: #666;
    margin: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Trending icon decoration */
.title-decoration {
    position: relative;
    display: flex;
    align-items: center;
}

.trending-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #FF416C, #FF4B2B);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(255, 65, 108, 0.3);
    animation: pulse 2s infinite;
}

.trending-icon i {
    font-size: 1.8rem;
    color: white;
    animation: flicker 1.5s infinite alternate;
}

/* Subtitle container */
.subtitle-container {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 600px;
    margin: 0 auto;
}

.subtitle-chinese {
    font-size: 1.2rem;
    color: #555;
    font-weight: 500;
    margin: 0;
}

.subtitle-english {
    font-size: 1rem;
    color: #777;
    font-weight: 400;
    margin: 0;
    font-style: italic;
    opacity: 0.9;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(255, 65, 108, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(255, 65, 108, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(255, 65, 108, 0.3);
    }
}

@keyframes flicker {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

/* Responsive design for header */
@media (max-width: 768px) {
    .title-container {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }
    
    .main-title {
        align-items: flex-start;
    }
    
    .title-chinese {
        font-size: 2.2rem;
    }
    
    .title-english {
        font-size: 1.1rem;
    }
    
    .trending-icon {
        width: 50px;
        height: 50px;
    }
    
    .trending-icon i {
        font-size: 1.4rem;
    }
    
    .subtitle-chinese {
        font-size: 1.1rem;
    }
    
    .subtitle-english {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .title-container {
        gap: 0.8rem;
    }
    
    .title-chinese {
        font-size: 1.8rem;
    }
    
    .title-english {
        font-size: 1rem;
    }
    
    .trending-icon {
        width: 45px;
        height: 45px;
    }
    
    .trending-icon i {
        font-size: 1.2rem;
    }
    
    .subtitle-container {
        gap: 0.2rem;
    }
}

/* Main content styles */
.hot-search-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hot-search-container {
        grid-template-columns: 1fr;
    }
}

/* Hot search list styles */
.hot-search-list {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Platform tabs */
.platform-tabs {
    display: flex;
    background-color: #f5f5f5;
    border-bottom: 1px solid #eee;
}

.platform-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.platform-tab:hover {
    background-color: rgba(78, 84, 200, 0.05);
}

.platform-tab.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background-color: rgba(78, 84, 200, 0.08);
}

.platform-tab i {
    font-size: 1.1rem;
}

#hot-topics {
    list-style-type: none;
}

#hot-topics li {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

#hot-topics li:hover {
    background-color: rgba(78, 84, 200, 0.05);
}

#hot-topics li.active {
    background-color: rgba(78, 84, 200, 0.1);
    border-left: 4px solid var(--primary-color);
}

.topic-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 4px;
}

.top-three .topic-number {
    background: linear-gradient(45deg, #FF416C, #FF4B2B);
}

.loading-item {
    text-align: center;
    color: #888;
    padding: 2rem !important;
}

.error-item {
    text-align: center;
    color: #ff5757;
    padding: 2rem !important;
}

/* News item styles for rich display */
.topic-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 4px;
}

.topic-content {
    flex: 1;
    min-width: 0;
}

.topic-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 6px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.topic-source {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(78, 84, 200, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.topic-date {
    font-size: 0.8rem;
    color: #888;
}

.topic-hot {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.topic-snippet {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-link {
    display: none; /* Hidden but available for functionality */
}

/* Content preview styles */
.content-preview {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.initial-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    text-align: center;
}

.initial-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    opacity: 0.7;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(78, 84, 200, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.content-state {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.content-state h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.content-meta {
    margin-bottom: 1.5rem;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.content-source-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.content-source {
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(78, 84, 200, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.content-date {
    color: #666;
    font-size: 0.9rem;
}

.content-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
    margin-left: auto;
}

.content-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.content-link i {
    font-size: 0.8rem;
}

.content-image-info {
    margin-top: 8px;
}

.image-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.image-status.real-image {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
}

.image-status.generated-image {
    background: rgba(255, 152, 0, 0.1);
    color: #ef6c00;
}

.image-status i {
    font-size: 0.8rem;
}

.content-image-container {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#generated-image {
    width: 100%;
    display: block;
}

.content-text {
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.8;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 30px;
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 84, 200, 0.3);
}

#regenerate-btn {
    background: linear-gradient(45deg, #6e48aa, #9d50bb);
}

#copy-btn {
    background: linear-gradient(45deg, #11998e, #38ef7d);
}

#share-btn {
    background: linear-gradient(45deg, #ff8008, #ffc837);
}

/* Footer styles */
footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: #888;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
} 