/* TheHotList - Charts & Rankings App Styles */

:root {
    --hotlist-primary: #FF6B35;
    --hotlist-secondary: #1A1A2E;
    --hotlist-accent: #FFD700;
    --hotlist-success: #00D26A;
    --hotlist-danger: #FF4757;
    --hotlist-bg: #0F0F1A;
    --hotlist-surface: #1A1A2E;
    --hotlist-surface-light: #252540;
    --hotlist-text: #FFFFFF;
    --hotlist-text-muted: #9999AA;
    --hotlist-border: #333355;
    --hotlist-gradient: linear-gradient(135deg, #FF6B35, #FFD700);
}

/* App Container */
.hotlist-app {
    min-height: 100vh;
    background: var(--hotlist-bg);
    color: var(--hotlist-text);
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--hotlist-surface);
    border-bottom: 1px solid var(--hotlist-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--hotlist-text);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--hotlist-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--hotlist-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--hotlist-primary);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.header-actions button,
.header-actions a {
    background: transparent;
    border: none;
    color: var(--hotlist-text);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.header-actions button:hover,
.header-actions a:hover {
    background: var(--hotlist-surface-light);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    z-index: 200;
}

.search-container {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    padding: 0 1rem;
}

.search-container input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    border: none;
    border-radius: 12px;
    background: var(--hotlist-surface);
    color: var(--hotlist-text);
}

.search-container button {
    padding: 1rem 2rem;
    background: var(--hotlist-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Page Headers */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
}

.page-header p {
    color: var(--hotlist-text-muted);
    margin: 0;
}

/* Home Page */
.hotlist-home .home-header {
    text-align: center;
    padding: 3rem 0;
}

.home-header h1 {
    font-size: 3rem;
    background: var(--hotlist-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.home-header p {
    color: var(--hotlist-text-muted);
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.view-all {
    color: var(--hotlist-primary);
    text-decoration: none;
    font-weight: 500;
}

/* Digest Section */
.digest-section {
    margin-bottom: 3rem;
}

.digest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.digest-card {
    background: var(--hotlist-surface);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.digest-card.highlight {
    background: var(--hotlist-gradient);
}

.digest-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.digest-label {
    display: block;
    color: var(--hotlist-text-muted);
    font-size: 0.875rem;
}

.digest-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

/* Chart List */
.chart-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--hotlist-surface);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.chart-item:hover {
    background: var(--hotlist-surface-light);
}

.rank-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50px;
}

.rank {
    font-size: 1.25rem;
    font-weight: 700;
}

.movement {
    font-size: 0.75rem;
}

.movement.up {
    color: var(--hotlist-success);
}

.movement.down {
    color: var(--hotlist-danger);
}

.movement.new {
    color: var(--hotlist-accent);
}

.item-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: var(--hotlist-surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    margin: 0;
    font-size: 1rem;
}

.item-info p {
    margin: 0;
    color: var(--hotlist-text-muted);
    font-size: 0.875rem;
}

.item-meta {
    text-align: right;
}

.content-type {
    display: block;
    font-size: 0.75rem;
    color: var(--hotlist-primary);
}

.weeks {
    font-size: 0.75rem;
    color: var(--hotlist-text-muted);
}

/* Trending Grid */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.trending-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--hotlist-surface);
    border-radius: 12px;
    border-left: 4px solid var(--hotlist-border);
}

.trending-card.rising {
    border-left-color: var(--hotlist-success);
}

.trend-icon {
    font-size: 1.5rem;
}

.trend-content h4 {
    margin: 0;
}

.trend-content p {
    margin: 0;
    color: var(--hotlist-text-muted);
    font-size: 0.875rem;
}

.source-app {
    display: inline-block;
    background: var(--hotlist-surface-light);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.chart-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--hotlist-surface);
    border-radius: 12px;
    text-decoration: none;
    color: var(--hotlist-text);
    transition: transform 0.2s, background 0.2s;
}

.chart-card:hover {
    transform: translateY(-2px);
    background: var(--hotlist-surface-light);
}

.chart-icon {
    font-size: 2rem;
}

.chart-info h4 {
    margin: 0;
}

.chart-info p {
    margin: 0;
    color: var(--hotlist-text-muted);
    font-size: 0.875rem;
}

/* Creators List */
.creators-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.creator-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--hotlist-surface);
    border-radius: 12px;
}

.creator-rank {
    width: 30px;
    text-align: center;
    font-weight: 700;
    color: var(--hotlist-accent);
}

.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--hotlist-surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.creator-info {
    flex: 1;
}

.creator-info h4 {
    margin: 0;
}

.creator-info p {
    margin: 0;
    color: var(--hotlist-text-muted);
    font-size: 0.875rem;
}

.creator-stats {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hotlist-accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--hotlist-text-muted);
}

/* Podium */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    padding: 2rem;
}

.podium-place {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    background: var(--hotlist-surface);
}

.podium-place.first {
    order: 2;
    padding-bottom: 2rem;
}

.podium-place.second {
    order: 1;
}

.podium-place.third {
    order: 3;
}

.crown {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.podium-place .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    overflow: hidden;
    border: 3px solid var(--hotlist-border);
}

.podium-place .avatar.gold {
    border-color: var(--hotlist-accent);
}

.podium-place .avatar.silver {
    border-color: #C0C0C0;
}

.podium-place .avatar.bronze {
    border-color: #CD7F32;
}

.position {
    display: inline-block;
    background: var(--hotlist-surface-light);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    line-height: 24px;
    margin-bottom: 0.5rem;
}

/* Leaderboard Table */
.leaderboard-table {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--hotlist-surface);
    border-radius: 12px;
}

.leaderboard-row .rank {
    width: 40px;
    text-align: center;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.user-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.details h4 {
    margin: 0;
}

.details p {
    margin: 0;
    color: var(--hotlist-text-muted);
    font-size: 0.875rem;
}

.stats {
    display: flex;
    gap: 1.5rem;
}

.stat {
    text-align: center;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.diamond {
    background: linear-gradient(135deg, #B9F2FF, #89CFF0);
    color: #1A1A2E;
}

.badge.gold {
    background: var(--hotlist-accent);
    color: #1A1A2E;
}

.badge.silver {
    background: #C0C0C0;
    color: #1A1A2E;
}

/* Bottom Nav */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--hotlist-surface);
    border-top: 1px solid var(--hotlist-border);
    padding: 0.5rem;
    z-index: 100;
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--hotlist-text-muted);
    padding: 0.5rem;
}

.bottom-nav a.active {
    color: var(--hotlist-primary);
}

.bottom-nav .icon {
    font-size: 1.25rem;
}

.bottom-nav .label {
    font-size: 0.625rem;
}

/* Footer */
.app-footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--hotlist-border);
    color: var(--hotlist-text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--hotlist-text-muted);
    text-decoration: none;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--hotlist-border);
    border-top-color: var(--hotlist-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Not Found */
.not-found-page {
    text-align: center;
    padding: 4rem 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

    .main-content {
        padding: 1rem;
        padding-bottom: 5rem;
    }

    .app-footer {
        display: none;
    }

    .podium {
        flex-wrap: wrap;
    }

    .podium-place {
        flex: 1;
        min-width: 100px;
    }
}
