/* ===================================
   Josh's Sports Blog - Main Stylesheet
   Color Scheme: Black (#000), Red (#DC143C), White (#FFF)
   =================================== */

/* CSS Variables */
:root {
    --primary-black: #000000;
    --primary-red: #DC143C;
    --primary-white: #FFFFFF;
    --dark-gray: #1a1a1a;
    --medium-gray: #333333;
    --light-gray: #f5f5f5;
    --border-gray: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --hover-red: #b31235;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-gray);
    margin: 0;
    padding: 0;
}

a {
    color: var(--primary-black);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-red);
}

/* ===================================
   Header & Branding
   =================================== */

.brand-bar {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: 1.5rem 0;
    border-bottom: 3px solid var(--primary-red);
    width: 100%;
}

.brand-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand-logo {
    flex-shrink: 0;
}

.logo-image {
    height: 60px;
    width: auto;
    display: block;
}

.brand-text {
    flex-grow: 1;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-white);
    margin: 0;
    letter-spacing: -0.5px;
}

.site-tagline {
    font-size: 0.875rem;
    color: #cccccc;
    margin: 0.25rem 0 0 0;
    font-weight: 300;
}

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

.notification-bell-link {
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.notification-bell-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-bell {
    font-size: 1.5rem;
    line-height: 1;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.btn-auth {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-signup {
    background-color: var(--primary-red);
    color: var(--primary-white);
    border: 2px solid var(--primary-red);
}

.btn-signup:hover {
    background-color: var(--hover-red);
    border-color: var(--hover-red);
    color: var(--primary-white);
}

.btn-login {
    background-color: transparent;
    color: var(--primary-white);
    border: 2px solid var(--primary-white);
}

.btn-login:hover {
    background-color: var(--primary-white);
    color: var(--primary-black);
}

/* ===================================
   Sports Navigation Bar
   =================================== */

.sports-navbar {
    background-color: var(--primary-white);
    border-bottom: 1px solid var(--border-gray);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

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

.sports-nav-list {
    list-style: none;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-divider {
    width: 1px;
    background-color: var(--border-gray);
    margin: 0.5rem 0;
}

.nav-link {
    display: block;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    color: var(--primary-red);
    background-color: var(--light-gray);
}

.nav-link.active {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
}

/* ===================================
   Homepage Layout - Three Columns
   =================================== */

.homepage-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 2rem;
    align-items: start;
}

/* Left Sidebar - This Week's Games */
.sidebar-left {
    position: sticky;
    top: 80px;
}

/* Right Sidebar - Editor's Picks */
.sidebar-right {
    position: sticky;
    top: 80px;
}

.sidebar-card {
    background-color: var(--primary-white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-gray);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-red);
}

/* ===================================
   Games List (Left Sidebar)
   =================================== */

.games-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-item {
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: 6px;
    border-left: 3px solid var(--primary-red);
    transition: transform 0.2s ease;
}

.game-item:hover {
    transform: translateX(3px);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.game-league {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
}

.status-upcoming {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-live {
    background-color: #ffebee;
    color: var(--primary-red);
}

.status-final {
    background-color: #f1f1f1;
    color: #666;
}

.game-matchup {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.team {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.team-score {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-black);
}

.game-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-gray);
}

/* ===================================
   Main Content - Top Stories
   =================================== */

.main-content {
    min-height: 100vh;
}

.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-red);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-black);
    margin: 0;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Large Article Cards (Top Stories) */
.article-card-large {
    background-color: var(--primary-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-gray);
}

.article-card-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.article-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card-large:hover .article-image img {
    transform: scale(1.05);
}

.article-categories {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
}

.category-badge {
    background-color: var(--primary-red);
    color: var(--primary-white);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.article-content {
    padding: 2rem;
}

.article-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-black);
}

.article-title a {
    color: var(--primary-black);
}

.article-title a:hover {
    color: var(--primary-red);
}

.article-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.author {
    font-weight: 600;
    color: var(--primary-black);
}

.separator {
    color: var(--border-gray);
}

/* ===================================
   Editor's Picks (Right Sidebar)
   =================================== */

.editors-picks-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-card-small {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-gray);
}

.article-card-small:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.article-small-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 6px;
}

.article-small-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card-small:hover .article-small-image img {
    transform: scale(1.1);
}

.article-small-categories {
    margin-bottom: 0.5rem;
}

.category-tag {
    display: inline-block;
    background-color: var(--light-gray);
    color: var(--primary-red);
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
}

.article-small-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--primary-black);
}

.article-small-title a {
    color: var(--primary-black);
}

.article-small-title a:hover {
    color: var(--primary-red);
}

.article-small-excerpt {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.article-small-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ===================================
   Footer
   =================================== */

.site-footer {
    background-color: var(--dark-gray);
    color: #cccccc;
    margin-top: 4rem;
    padding: 3rem 0 1rem;
    width: 100%;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--primary-white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #cccccc;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    border-top: 1px solid #444;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.875rem;
    color: #999;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1200px) {
    .homepage-container {
        grid-template-columns: 240px 1fr 280px;
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .homepage-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        display: flex;
        flex-direction: column;
    }

    .sidebar-left,
    .sidebar-right {
        position: static;
    }

    /* Mobile order: Articles → Editor's Picks → Games */
    .main-content {
        order: 1;
    }

    .sidebar-right {
        order: 2;
    }

    .sidebar-left {
        order: 3;
    }
}

@media (max-width: 768px) {
    .brand-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .user-actions {
        justify-content: center;
    }

    .sports-nav-list {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-link {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }

    .homepage-container {
        padding: 0 1rem;
    }

    .article-image {
        height: 250px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Authentication Pages Styles
   =========================== */

.auth-page {
    min-height: calc(100vh - 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: #ffffff;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 3rem 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    color: #0a0a0a;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.form-input::placeholder {
    color: #999;
}

.validation-error {
    display: block;
    color: #dc143c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.validation-summary {
    background: rgba(220, 20, 60, 0.1);
    border: 1px solid #dc143c;
    border-radius: 8px;
    padding: 1rem;
    color: #dc143c;
    font-size: 0.875rem;
}

.validation-summary ul {
    margin: 0;
    padding-left: 1.5rem;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    margin: -0.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0a0a0a;
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #dc143c;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: #dc143c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: #b91030;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.auth-links {
    text-align: center;
    margin-top: -0.5rem;
}

.auth-link-small {
    color: #666;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-link-small:hover {
    color: #dc143c;
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.auth-footer-text {
    color: #666;
    font-size: 0.875rem;
    margin: 0;
}

.auth-link {
    color: #dc143c;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #ff4757;
    text-decoration: underline;
}

/* Auth Page Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .auth-page {
        padding: 2rem 1rem;
    }
}

/* ===========================
   Header Logout Form Styles
   =========================== */

.logout-form {
    display: inline;
    margin: 0;
}

.btn-profile {
    background: #dc143c;
    color: #ffffff;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-profile:hover {
    background: #b91030;
}

.logout-form {
    display: inline;
    margin: 0;
}

.logout-form .btn-logout {
    background: #dc143c;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.logout-form .btn-logout:hover {
    background: #b91030;
}

/* ===========================
   Profile Page Styles
   =========================== */

.profile-page {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.profile-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
}

.avatar-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #dc143c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    border: 3px solid #e0e0e0;
}

.profile-info {
    flex: 1;
}

.profile-username {
    font-size: 2rem;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0 0 0.5rem 0;
}

.profile-email {
    color: #666;
    margin: 0 0 0.25rem 0;
}

.profile-joined {
    color: #888;
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

.btn-edit-profile {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #dc143c;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-edit-profile:hover {
    background: #b91030;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0 0 1rem 0;
}

.profile-bio {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

.profile-bio-empty,
.teams-empty {
    color: #888;
    font-style: italic;
}

.teams-empty a {
    color: #dc143c;
    text-decoration: none;
}

.teams-empty a:hover {
    text-decoration: underline;
}

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

.team-badge {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.team-badge:hover {
    border-color: #dc143c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.team-name {
    display: block;
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 0.25rem;
}

.team-league {
    display: block;
    font-size: 0.875rem;
    color: #666;
}

/* ===========================
   Edit Profile Page Styles
   =========================== */

.edit-profile-page {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.edit-profile-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0;
}

.btn-back {
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.btn-back:hover {
    color: #dc143c;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(0, 200, 0, 0.1);
    border: 1px solid rgba(0, 200, 0, 0.3);
    color: #006600;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    color: #0a0a0a;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.form-input-file {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 0.875rem;
}

.form-help {
    display: block;
    color: #888;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.teams-selection {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sport-group {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
}

.sport-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dc143c;
}

.teams-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.team-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.team-checkbox-label:hover {
    border-color: #dc143c;
    background: #fff5f7;
}

.team-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #dc143c;
}

.team-checkbox-text {
    font-size: 0.875rem;
    color: #0a0a0a;
}

.no-teams-message {
    color: #888;
    font-style: italic;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 8px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-cancel {
    padding: 1rem 2rem;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

/* Profile Page Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        margin: 0 auto;
    }

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

    .teams-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }
}

/* ===========================
   Admin Pages Styles
   =========================== */

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

.admin-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-container-form {
    max-width: 900px;
    margin: 2rem auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #dc143c;
}

.admin-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0;
}

.admin-subtitle {
    color: #666;
    margin: 0.5rem 0 0 0;
}

.btn-admin {
    background: #dc143c;
    color: #ffffff;
}

.btn-admin:hover {
    background: #b91030;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #dc143c 0%, #b91030 100%);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
}

.stat-icon {
    font-size: 3rem;
    filter: brightness(0) invert(1);
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin Section */
.admin-section {
    margin-bottom: 2.5rem;
}

.admin-section:last-child {
    margin-bottom: 0;
}

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

.action-card {
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.action-card:hover {
    border-color: #dc143c;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(220, 20, 60, 0.2);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.action-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0 0 0.5rem 0;
}

.action-description {
    color: #666;
    font-size: 0.875rem;
    margin: 0;
}

/* Data Table */
.articles-table {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table thead {
    background: #f8f8f8;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: #0a0a0a;
    border-bottom: 2px solid #dc143c;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

.article-link {
    color: #dc143c;
    text-decoration: none;
    font-weight: 600;
}

.article-link:hover {
    text-decoration: underline;
}

.btn-table-action {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #dc143c;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-table-action:hover {
    background: #b91030;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-style: italic;
}

.no-data a {
    color: #dc143c;
    text-decoration: none;
    font-weight: 600;
}

.no-data a:hover {
    text-decoration: underline;
}

/* Admin Form */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.btn-submit-primary {
    background: #dc143c;
}

.btn-submit-primary:hover {
    background: #b91030;
}

/* Admin Responsive */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .admin-title {
        font-size: 2rem;
    }

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

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

    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* ========================================
   Article Detail Page Styles
   ======================================== */

.article-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: white;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
    text-align: center;
}

.article-tags-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.article-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.article-page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-page-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.article-page-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.article-page-meta .separator {
    color: #d1d5db;
}

.article-images {
    margin-bottom: 2rem;
}

.article-page-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-page-content {
    font-size: 1.125rem;
    line-height: 1.4;
    color: #374151;
    margin-bottom: 3rem;
}

.article-page-content p {
    margin-bottom: 1rem;
}

.article-page-content p:last-child {
    margin-bottom: 0;
}

.article-footer {
    border-top: 2px solid #e5e7eb;
    padding-top: 2rem;
    margin-bottom: 3rem;
}

.article-tags {
    margin-bottom: 1.5rem;
}

.article-tags .tag {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    text-transform: capitalize;
}

.article-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.article-tags-inline .tag {
    display: inline-block;
    background: #dc143c;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Tags Checkbox Grid */
.tags-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: #f3f4f6;
    border-color: #dc143c;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #dc143c;
}

.checkbox-label span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.checkbox-label input[type="checkbox"]:checked + span {
    color: #dc143c;
    font-weight: 600;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.article-share span {
    color: #6b7280;
    font-weight: 500;
}

.share-btn {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.share-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Comments Section */
.comments-section {
    border-top: 2px solid #e5e7eb;
    padding-top: 2rem;
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #dc2626;
}

.comment-author {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.comment-date {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.comment-content {
    color: #374151;
    line-height: 1.6;
}

.no-comments {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Article Page Responsive */
@media (max-width: 768px) {
    .article-page {
        padding: 1rem;
    }

    .article-page-title {
        font-size: 1.75rem;
    }

    .article-page-subtitle {
        font-size: 1rem;
    }

    .article-page-content {
        font-size: 1rem;
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   Image Upload Groups
   ======================================== */

.image-upload-group {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.image-upload-group h4 {
    color: #111827;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dc2626;
}

.form-sub-group {
    margin-bottom: 1rem;
}

.form-sub-group:last-child {
    margin-bottom: 0;
}

.form-label-sm {
    display: block;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-help-sm {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* ========================================
   Inline Article Images
   ======================================== */

.article-inline-image {
    margin: 2rem 0;
    text-align: center;
}

.article-inline-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-inline-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

.article-inline-image figcaption a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

.article-inline-image figcaption a:hover {
    text-decoration: underline;
}

/* ========================================
   Danger/Delete Styles
   ======================================== */

.action-card-danger {
    border: 2px solid #dc2626;
}

.action-card-danger:hover {
    background: #fee2e2;
    border-color: #b91c1c;
}

.btn-submit-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: none;
}

.btn-submit-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
}

.alert-error {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    color: #991b1b;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

/* ========================
   COMMENTS SECTION
   ======================== */

.comments-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #e5e7eb;
}

.comments-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2rem;
}

/* Comment Form */
.comment-form-container {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.comment-form-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
}

.comment-form .form-group {
    margin-bottom: 1.5rem;
}

.comment-form .form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.comment-form .form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.comment-form .form-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.comment-form .btn-submit {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form .btn-submit:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Login Prompt */
.login-prompt {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.login-prompt p {
    margin: 0;
    font-size: 1.1rem;
    color: #6b7280;
}

.login-prompt a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.comment {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.comment:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 700;
    color: #111827;
    font-size: 1rem;
}

.comment-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.comment-content {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-reply {
    background: transparent;
    color: #dc2626;
    border: 1px solid #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reply:hover {
    background: #dc2626;
    color: white;
}

.btn-delete {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
}

.btn-like {
    background: transparent;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-like:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.btn-like.liked {
    background: #fee2e2;
    border-color: #dc2626;
    color: #dc2626;
}

.btn-like.liked:hover {
    background: #fecaca;
}

.like-count {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-left: 0.25rem;
}

.btn-like.liked .like-count {
    color: #dc2626;
}

.like-count-display {
    color: #6b7280;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Reply Form */
.reply-form-container {
    margin-top: 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
}

.reply-form .form-group {
    margin-bottom: 1rem;
}

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

.btn-submit-sm {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-sm:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
}

.btn-cancel {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Nested Replies */
.replies-container {
    margin-top: 1.5rem;
    margin-left: 2rem;
    padding-left: 2rem;
    border-left: 3px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment.reply {
    background: #f9fafb;
}

/* Reduce indent for very deep nesting (depth 4+) */
.comment[data-depth="4"] .replies-container,
.comment[data-depth="5"] .replies-container,
.comment[data-depth="6"] .replies-container,
.comment[data-depth="7"] .replies-container,
.comment[data-depth="8"] .replies-container,
.comment[data-depth="9"] .replies-container {
    margin-left: 1rem;
    padding-left: 1rem;
}

/* Alternate background colors for better visual hierarchy */
.comment[data-depth="2"].reply {
    background: #fafafa;
}

.comment[data-depth="3"].reply {
    background: #f5f5f5;
}

.comment[data-depth="4"].reply,
.comment[data-depth="5"].reply,
.comment[data-depth="6"].reply,
.comment[data-depth="7"].reply,
.comment[data-depth="8"].reply,
.comment[data-depth="9"].reply {
    background: #f0f0f0;
}

.no-comments {
    text-align: center;
    color: #6b7280;
    font-size: 1.1rem;
    padding: 3rem 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .comments-section {
        margin-top: 3rem;
        padding-top: 2rem;
    }

    .comments-title {
        font-size: 1.5rem;
    }

    .comment-form-container {
        padding: 1.5rem;
    }

    .comment {
        padding: 1rem;
    }

    .replies-container {
        margin-left: 1rem;
        padding-left: 1rem;
    }

    /* On mobile, reduce indent even more for deep nesting */
    .comment[data-depth="3"] .replies-container,
    .comment[data-depth="4"] .replies-container,
    .comment[data-depth="5"] .replies-container,
    .comment[data-depth="6"] .replies-container,
    .comment[data-depth="7"] .replies-container,
    .comment[data-depth="8"] .replies-container,
    .comment[data-depth="9"] .replies-container {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .comment-actions {
        flex-wrap: wrap;
    }

    .reply-form-actions {
        flex-direction: column;
    }

    .btn-submit-sm,
    .btn-cancel {
        width: 100%;
    }
}
