/* tweets/style.css */
:root {
    --primary: #1DA1F2;
    --primary-dark: #1a91da;
    --secondary: #14171a;
    --accent: #ff6b6b;
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #21262d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --border: #30363d;
    --success: #2ea043;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
    background: var(--gradient);
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 3rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #fff, #e0e0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.last-updated {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tweets Container */
.tweets-container {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.tweet-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tweet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tweet-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.tweet-card:hover::before {
    opacity: 1;
}

.tweet-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.username {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.verified {
    color: var(--primary);
    font-size: 1rem;
}

.handle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tweet-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.tweet-text a {
    color: var(--primary);
    text-decoration: none;
}

.tweet-text a:hover {
    text-decoration: underline;
}

.tweet-media {
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
}

.tweet-media img,
.tweet-media video {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.tweet-stats {
    display: flex;
    gap: 30px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.tweet-rank {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 30px 0;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 10px;
}

.page-number {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-number:hover,
.page-number.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.disclaimer {
    margin-top: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .stats-bar {
        grid-template-columns: 1fr;
    }
    
    .tweet-stats {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .last-updated {
        flex-direction: column;
        gap: 10px;
    }
}

/* Error State */
.error-message {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
}

/* Hashtag styling */
.hashtag {
    color: var(--primary);
    font-weight: 500;
}

/* Mention styling */
.mention {
    color: var(--primary);
    font-weight: 500;
}