/* Community Page Styling */

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #202124;
}

/* Header */
.season-header {
    background: linear-gradient(135deg, #002D72 0%, #004494 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all 0.2s;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.season-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.community-page {
    min-height: calc(100vh - 80px);
    background: transparent;
    padding: 40px 20px;
}

.community-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Community Tabs */
.community-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: white;
    border: 2px solid #E8EAED;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-button:hover {
    border-color: #002D72;
    background: #F8F9FA;
}

.tab-button.active {
    background: linear-gradient(135deg, #002D72 0%, #004494 100%);
    color: white;
    border-color: #002D72;
}

.tab-button .tab-icon {
    font-size: 20px;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #002D72;
    margin: 0;
}

.section-subtitle {
    font-size: 14px;
    color: #5f6368;
    margin-top: 4px;
}

/* Feed Filters */
.feed-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #E8EAED;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #002D72;
    background: #F8F9FA;
}

.filter-btn.active {
    background: #002D72;
    color: white;
    border-color: #002D72;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.activity-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.activity-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF5910 0%, #FF7b3e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.activity-meta {
    flex: 1;
}

.activity-user {
    font-weight: 700;
    color: #002D72;
    font-size: 15px;
}

.activity-time {
    font-size: 12px;
    color: #5f6368;
}

.activity-content {
    margin-bottom: 12px;
    color: #202124;
    line-height: 1.6;
}

/* Locked Prediction Activity Styling */
.locked-prediction-activity {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-title {
    font-size: 16px;
    font-weight: 600;
    color: #002D72;
}

.prediction-summary {
    font-size: 14px;
    color: #5f6368;
    line-height: 1.6;
    padding: 12px;
    background: #F8F9FA;
    border-radius: 8px;
    border-left: 3px solid #002D72;
}

.boldest-pick-badge {
    font-size: 13px;
    padding: 8px 12px;
    background: #FFF8E1;
    border-left: 3px solid #F9AB00;
    border-radius: 6px;
    color: #202124;
}

.boldest-pick-badge strong {
    color: #F9AB00;
}

.contrarian-picks-badge {
    font-size: 13px;
    padding: 8px 12px;
    background: #FCE8E6;
    border-left: 3px solid #C5221F;
    border-radius: 6px;
    color: #202124;
}

.contrarian-picks-badge strong {
    color: #C5221F;
}

.activity-actions {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid #E8EAED;
}

.activity-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: none;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
}

.activity-action-btn:hover {
    background: #F8F9FA;
    color: #002D72;
}

.activity-action-btn.liked {
    color: #FF5910;
}

.activity-action-btn .icon {
    font-size: 16px;
}

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

.trending-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
    border: 2px solid transparent;
}

.trending-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: #FF5910;
}

.trending-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFF3E0;
    color: #FF5910;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.trending-stats {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E8EAED;
}

.trending-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #5f6368;
}

.trending-stat .icon {
    font-size: 16px;
}

/* Challenges Section */
.challenges-subsection {
    margin-bottom: 40px;
}

.challenges-subsection h3 {
    font-size: 20px;
    font-weight: 700;
    color: #002D72;
    margin-bottom: 16px;
}

.challenges-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.challenge-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #FF5910;
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.challenge-users {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #002D72;
}

.challenge-vs {
    color: #FF5910;
    font-weight: 900;
    font-size: 14px;
}

.challenge-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.challenge-status.pending {
    background: #FFF3E0;
    color: #FF5910;
}

.challenge-status.active {
    background: #E6F4EA;
    color: #34A853;
}

.challenge-status.completed {
    background: #E8EAED;
    color: #5f6368;
}

.challenge-score {
    display: flex;
    gap: 24px;
    margin-top: 12px;
}

.challenge-score-item {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: #F8F9FA;
    border-radius: 8px;
}

.challenge-score-value {
    font-size: 24px;
    font-weight: 700;
    color: #002D72;
}

.challenge-score-label {
    font-size: 12px;
    color: #5f6368;
    margin-top: 4px;
}

/* Challenge Leaderboard */
.challenge-leaderboard {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.challenge-leaderboard-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #E8EAED;
    transition: all 0.2s;
}

.challenge-leaderboard-item:hover {
    background: #F8F9FA;
}

.challenge-leaderboard-item:last-child {
    border-bottom: none;
}

.challenge-rank {
    font-size: 18px;
    font-weight: 700;
    color: #5f6368;
    width: 40px;
    text-align: center;
}

.challenge-rank.top-1 {
    color: #FFD700;
}

.challenge-rank.top-2 {
    color: #C0C0C0;
}

.challenge-rank.top-3 {
    color: #CD7F32;
}

.challenge-user-info {
    flex: 1;
}

.challenge-user-name {
    font-weight: 700;
    color: #002D72;
}

.challenge-wins {
    font-size: 20px;
    font-weight: 700;
    color: #34A853;
}

/* Hot Takes */
.hot-takes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hot-take-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #FF5910;
}

.hot-take-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.hot-take-flame {
    font-size: 32px;
}

.hot-take-content {
    font-size: 16px;
    line-height: 1.6;
    color: #202124;
    margin-bottom: 16px;
}

.hot-take-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #E8EAED;
}

.hot-take-reactions {
    display: flex;
    gap: 12px;
}

/* Profiles Grid */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.profile-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.2s;
}

.profile-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.profile-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #002D72 0%, #004494 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin: 0 auto 16px;
}

.profile-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #002D72;
    margin-bottom: 8px;
}

.profile-card-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E8EAED;
}

.profile-card-stat {
    text-align: center;
}

.profile-card-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #002D72;
}

.profile-card-stat-label {
    font-size: 11px;
    color: #5f6368;
    text-transform: uppercase;
    margin-top: 4px;
}

.profile-card-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #FF5910 0%, #FF7b3e 100%);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(255, 89, 16, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 89, 16, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    color: #002D72;
    border: 2px solid #E8EAED;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: #002D72;
    background: #F8F9FA;
}

.btn-small {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-icon {
    padding: 8px;
    border-radius: 50%;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-content.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #E8EAED;
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #002D72;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #5f6368;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #F8F9FA;
    color: #002D72;
}

.modal-body {
    padding: 24px;
}

.modal-body textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #E8EAED;
    border-radius: 8px;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 15px;
    resize: vertical;
    transition: all 0.2s;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #002D72;
}

.modal-body label {
    display: block;
    font-weight: 600;
    color: #202124;
    margin-bottom: 8px;
    margin-top: 16px;
}

.modal-body label:first-child {
    margin-top: 0;
}

.modal-body select {
    width: 100%;
    padding: 12px;
    border: 2px solid #E8EAED;
    border-radius: 8px;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 15px;
    transition: all 0.2s;
}

.modal-body select:focus {
    outline: none;
    border-color: #002D72;
}

.share-options {
    margin-top: 16px;
}

.share-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.share-options input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #002D72;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #E8EAED;
}

/* Follow Button */
.follow-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #002D72 0%, #004494 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 45, 114, 0.3);
}

.follow-btn.following {
    background: white;
    color: #002D72;
    border: 2px solid #002D72;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #5f6368;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-subtext {
    font-size: 14px;
}

/* Loading States */
.loading-spinner {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #5f6368;
}

.loading-spinner::before {
    content: '⚾';
    display: inline-block;
    animation: spin 1s linear infinite;
    font-size: 32px;
    margin-bottom: 12px;
}

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

/* New Posts Banner */
.new-posts-banner {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #1DA1F2 0%, #1991DB 100%);
    color: white;
    padding: 12px 32px;
    border-radius: 100px;
    box-shadow: 0 4px 16px rgba(29, 161, 242, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.new-posts-banner.visible {
    transform: translateX(-50%) translateY(0);
}

.new-posts-banner:hover {
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.5);
    transform: translateX(-50%) translateY(-2px);
}

.new-posts-banner:active {
    transform: translateX(-50%) translateY(0);
}

/* Post Cards (X-style) */
.post-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    border: 1px solid #E8EAED;
}

.post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #002D72;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF5910 0%, #FF7b3e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.post-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 89, 16, 0.3);
}

.post-meta {
    flex: 1;
}

.post-user {
    font-weight: 700;
    color: #002D72;
    font-size: 16px;
    cursor: pointer;
}

.post-user:hover {
    text-decoration: underline;
}

.post-time {
    font-size: 13px;
    color: #5f6368;
    margin-top: 2px;
}

.post-content {
    margin-bottom: 16px;
    color: #202124;
    line-height: 1.6;
}

.post-text {
    font-size: 15px;
    margin-bottom: 12px;
}

/* Post Engagement */
.post-engagement {
    border-top: 1px solid #E8EAED;
    padding-top: 12px;
}

.reactions-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #F8F9FA;
    border: 1px solid #E8EAED;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: #5f6368;
    font-weight: 500;
}

.reaction-btn:hover {
    background: #E8EAED;
    border-color: #002D72;
}

.reaction-btn.active {
    background: linear-gradient(135deg, #002D72 0%, #004494 100%);
    color: white;
    border-color: #002D72;
}

.reaction-btn span:first-child {
    font-size: 18px;
    line-height: 1;
}

.reaction-btn span:last-child {
    font-size: 13px;
    font-weight: 600;
}

.post-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: none;
    border: 1px solid #E8EAED;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #F8F9FA;
    border-color: #002D72;
    color: #002D72;
}

.action-btn span:first-child {
    font-size: 16px;
}

/* Loading More */
.loading-more {
    text-align: center;
    padding: 20px;
    color: #5f6368;
    font-size: 14px;
}

.loading-more::before {
    content: '⚾';
    display: inline-block;
    animation: spin 1s linear infinite;
    font-size: 24px;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .community-header h1 {
        font-size: 32px;
    }

    .community-header .subtitle {
        font-size: 16px;
    }

    .community-tabs {
        justify-content: flex-start;
    }

    .tab-button {
        padding: 12px 18px;
        font-size: 14px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .feed-filters {
        width: 100%;
        justify-content: flex-start;
    }

    .trending-grid {
        grid-template-columns: 1fr;
    }

    .profiles-grid {
        grid-template-columns: 1fr;
    }

    .challenge-score {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
    }

    .modal-header h3 {
        font-size: 20px;
    }
}
