/* ======================================== */
/* General Theme Styles            */
/* ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: white;
    line-height: 1.5;
    min-height: 100vh; /* Use min-height for default scrolling pages */
    /* REMOVE display:flex, height, overflow:hidden from the general body rule */
}

body.chat-page {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Fixed height ONLY for chat page */
    overflow: hidden; /* No body scroll ONLY for chat page */
}

body.chat-page nav { /* Target header ONLY on chat page */
    flex-shrink: 0;
}
body.chat-page footer { /* Target footer ONLY on chat page */
    flex-shrink: 0;
}
body.chat-page .main-chat-layout {
    flex-grow: 1;
    overflow: hidden;
    margin: 0 15px 15px 15px; /* Keep adjusted margins */
    max-height: none;
    height: 0; /* Needed for flex overflow */
     display: flex; /* Make sure display:flex is here */
     gap: 15px; /* Keep gap */
     background-color: #121212; /* Keep background */
}
body.chat-page #user-list-sidebar {
     height: 100%; /* Let flexbox handle height */
     overflow-y: auto; /* Allow sidebar scroll */
     /* Keep other sidebar styles */
     flex: 0 0 220px;
     padding: 15px;
     background-color: #1e1e1e;
     border: 1px solid #333;
     border-radius: 8px;
     display: flex;
     flex-direction: column;
}
body.chat-page .chat-container {
     height: 100%; /* Let flexbox handle height */
     display: flex; /* Ensure it's still flex */
     flex-direction: column; /* Stack elements */
     /* Keep other chat container styles */
     flex-grow: 1;
     border: 1px solid #333;
     border-radius: 8px;
     background-color: #1e1e1e;
     overflow: hidden;
     min-width: 300px;
}
body.chat-page .messages-display {
    flex-grow: 1;
    overflow-y: auto; /* Scroll messages */
    /* Keep other message display styles */
     padding: 15px;
     color: #eee;
     display: flex;
     flex-direction: column;
}
body.chat-page .message-input-area {
     flex-shrink: 0; /* Keep input area from shrinking */
     /* Keep existing input area styles */
      display: flex;
      padding: 10px;
      border-top: 1px solid #333;
      background-color: #2a2a2a;
      border-radius: 0 0 8px 8px;
}

a {
    color: #ff3c3c; /* Red links */
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ======================================== */
/* Header / Navigation Styles      */
/* ======================================== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e1e1e; /* Dark background */
    padding: 15px 40px;
    border-bottom: 1px solid #333; /* Optional subtle border */
    flex-shrink: 0;
}

/* Logo link styling */
nav a.logo-link {
    text-decoration: none;
    color: inherit;
}

nav .logo {
    font-weight: bold;
    font-size: 1.6rem;
    color: #ff3c3c;
}

/* Navigation Links List */
nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Individual Navigation Links */
nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    font-size: 1rem;
}
nav ul li a:hover {
    color: #ff3c3c;
}

/* Logged-in User Greeting Area */
nav .user-greeting {
    color: #ff3c3c;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Logout Link Styling (as a button) */
nav a.logout-link {
    color: #ff3c3c;
    border: 2px solid #ff3c3c;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease;
}
nav a.logout-link:hover {
    background-color: #ff3c3c;
    color: white;
}

/* Dashboard Link Styling (as a button) */
nav a.dashboard-link {
    color: white;
    background-color: #ff3c3c;
    border: 2px solid #ff3c3c;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
nav a.dashboard-link:hover {
    background-color: #cc0000;
    border-color: #cc0000;
    color: white;
}

/* Logged-out Auth Buttons */
nav .auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}
nav .auth-buttons a {
    padding: 8px 16px;
    border: 1px solid #ff3c3c;
    color: #ff3c3c;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease;
}
nav .auth-buttons a:hover {
     background-color: #ff3c3c;
     color: white;
}

/* ======================================== */
/* Dashboard Layout Styles         */
/* ======================================== */
.dashboard-container {
    display: flex;
    padding: 30px 40px;
    gap: 30px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Sidebar Styles */
.sidebar {
    flex: 1; /* Takes 1 part of the space */
    min-width: 200px;
    max-width: 250px;
    background-color: #1e1e1e; /* Sidebar background */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.3); /* Red shadow */
    height: fit-content; /* Adjust height to content */
}
.sidebar h3 {
    color: #ff3c3c; /* Red heading */
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}
/* Links within the sidebar */
.sidebar .profile-link { /* Assuming this class is used for other links too */
    display: block;
    background-color: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 10px;
    border: 1px solid #555;
    text-decoration: none; /* Ensure no underline */
}
.sidebar .profile-link:hover {
    background-color: #444;
    text-decoration: none;
}

/* Main Content Area Styles */
.main-content {
    flex: 3; /* Takes 3 parts of the space */
    min-width: 300px;
}
.main-content h3 {
    color: #ff3c3c; /* Red heading */
    margin-bottom: 20px;
}

/* Community Feed Styles */
.community-feed .post {
    background-color: #1e1e1e; /* Post background */
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}
.community-feed .post .user-info {
    font-weight: bold;
    color: #eee;
    margin-bottom: 10px;
}
.community-feed .post .post-content-placeholder {
    border: 2px dashed #ff3c3c; /* Red dashed border */
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    margin-bottom: 15px;
    background-color: #282828; /* Placeholder background */
}
.community-feed .post .post-text {
    margin-bottom: 15px;
    line-height: 1.5; /* Ensure post text also has good line height */
}
.community-feed .post .actions {
    font-size: 0.9em;
    color: #bbb;
}
.community-feed .post .actions span {
    margin-right: 15px;
}

/* ======================================== */
/* Responsive Adjustments          */
/* ======================================== */
@media (max-width: 768px) {
    nav {
        padding: 15px 20px; /* Reduce padding on smaller screens */
        flex-wrap: wrap; /* Allow nav items to wrap */
        justify-content: center; /* Center items when wrapped */
        gap: 10px; /* Add gap when wrapped */
    }
    nav ul {
        gap: 15px; /* Reduce gap */
        order: 1; /* Move nav links below logo/auth on wrap */
        width: 100%; /* Take full width when wrapped */
        justify-content: center; /* Center links */
        margin-top: 10px; /* Add space above links when wrapped */
    }
    nav .user-greeting, nav .auth-buttons {
        font-size: 0.9em; /* Slightly smaller font */
    }

    .dashboard-container {
        flex-direction: column; /* Stack elements vertically */
        padding: 20px; /* Reduce padding */
    }
    .sidebar {
        max-width: 100%; /* Allow sidebar to take full width */
        margin-bottom: 20px;
    }
    .main-content {
       min-width: unset; /* Remove min-width */
    }
}

/* Add any other specific styles for login/register pages if needed */
/* e.g., body styles specific to login/register if different from main */
/* .login-container { ... } */
/* .register-container { ... } */

/* ======================================== */
/* Profile Tab Styles                */
/* ======================================== */

.profile-tabs {
    display: flex;
    gap: 10px; /* Adjust spacing between tabs */
    border-bottom: 1px solid #444; /* Line below tabs */
    margin-bottom: 25px;
    overflow-x: auto; /* Allow scrolling on small screens if tabs overflow */
}

.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    background-color: transparent; /* Default background */
    border: none; /* Remove default button border */
    border-bottom: 3px solid transparent; /* Placeholder for active border */
    color: #bbb; /* Inactive tab text color */
    font-size: 1rem;
    font-weight: bold;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap; /* Prevent tabs from wrapping text */
}

.tab-link:hover {
    color: white; /* Text color on hover */
}

.tab-link.active {
    color: white; /* Active tab text color */
    border-bottom-color: #ff3c3c; /* Red border for active tab */
}

/* Style for the content sections */
.tab-content {
    display: none; /* Hide all tab content by default */
    padding-top: 10px; /* Space between tabs and content */
    animation: fadeIn 0.5s; /* Simple fade-in animation */
}

.tab-content.active {
    display: block; /* Show only the active tab content */
}

/* Simple fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Basic table styling for fight history example */
.tab-content table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
    font-size: 0.9em;
}
.tab-content th, .tab-content td {
    padding: 8px 5px;
    text-align: left;
    border-bottom: 1px solid #333;
}
.tab-content thead th {
    border-bottom-width: 2px;
    border-bottom-color: #555;
    color: #ccc;
}
/* Add other necessary styles for stats, posts etc. */

/* ======================================== */
/* Landing Page Specific Styles           */
/* ======================================== */

/* General Container for Centering Content */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px; /* Add some horizontal padding */
}

/* CTA Button Base Style */
.cta-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #ff3c3c;
    color: white;
    border: 2px solid #ff3c3c;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    text-align: center;
}
.cta-button:hover {
    background-color: #cc0000;
    border-color: #cc0000;
    color: white;
    text-decoration: none;
    transform: translateY(-2px); /* Slight lift effect */
}


/* Hero Section Styles */
.hero {
     /* Placeholder background */
    /* Suggestion: Replace placehold.co with a real, relevant boxing image URL */
    color: white;
    padding: 100px 20px; /* More vertical padding */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh; /* Make hero taller */
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 3rem; /* Larger heading */
    margin-bottom: 15px;
    font-weight: bold;
    color: white; /* Ensure high contrast */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #eee; /* Slightly off-white */
    line-height: 1.6;
}

/* Features Section Styles */
.features {
    padding: 60px 0;
    background-color: #1e1e1e; /* Slightly different dark shade */
}

.features h2 {
    text-align: center;
    color: #ff3c3c;
    font-size: 2rem;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: 30px;
}

.feature-item {
    background-color: #2a2a2a; /* Card background */
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 60, 60, 0.1);
}

.feature-icon {
    font-size: 2.5rem; /* Adjust if using real icons */
    color: #ff3c3c;
    margin-bottom: 15px;
    /* If using Font Awesome, replace .feature-icon div with <i> */
    /* i { font-size: 2.5rem; color: #ff3c3c; margin-bottom: 15px; } */
}

.feature-item h3 {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.5;
}


/* Testimonials Section Styles */
.testimonials {
    padding: 60px 0;
    background-color: #121212; /* Main background color */
}

.testimonials h2 {
     text-align: center;
    color: #ff3c3c;
    font-size: 2rem;
    margin-bottom: 40px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: #1e1e1e;
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid #ff3c3c; /* Accent border */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
     box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.testimonial-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #ff3c3c;
    margin-bottom: 15px;
}

.testimonial-card blockquote {
    font-style: italic;
    color: #eee;
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1; /* Helps align cite at bottom if heights vary */
    quotes: "“" "”";
}
.testimonial-card blockquote::before { content: open-quote; }
.testimonial-card blockquote::after { content: close-quote; }


.testimonial-card cite {
    font-weight: bold;
    color: #ff3c3c;
    font-style: normal;
    margin-top: auto; /* Push cite to bottom */
}

/* Final CTA Section Styles */
.cta-final {
    background-color: #1e1e1e;
    padding: 50px 20px;
    text-align: center;
    color: white;
}

.cta-final h2 {
    font-size: 2rem;
    color: #ff3c3c;
    margin-bottom: 15px;
}

.cta-final p {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta-button {
     padding: 15px 35px; /* Make button larger */
     font-size: 1.1rem;
}


/* Remove Old Landing Page Styles (If they were global) */
/* Selectively remove or adjust styles previously targeting .main, .featured, .main-image, .footer-cta if they conflict */
/* Example: */
/* .main, .featured, .main-image, .testimonials .testimonial-section, .footer-cta { */
/*     display: none; /* Or remove rules if they were in style.css */
/* } */

/* Add relevant media queries from original inline style if needed */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .features-grid { grid-template-columns: 1fr; /* Stack features */ }
    .testimonial-grid { grid-template-columns: 1fr; /* Stack testimonials */ }
}

/* ======================================== */
/* Community Feed Styles                  */
/* ======================================== */

/* Container for the page content */
.page-container {
    max-width: 800px; /* Adjust max-width for feed readability */
    margin: 0 auto; /* Center container */
}

.page-container h2 {
    color: #ff3c3c;
    margin-bottom: 25px;
    text-align: center; /* Center title */
    font-size: 2rem;
}

/* Card base style for create post and individual posts */
.card {
    background-color: #1e1e1e;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #333; /* Subtle border */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Ensures border-radius applies to children */
}

/* --- Create Post Section --- */
.create-post {
    padding: 15px;
}

.create-post-header {
    display: flex;
    align-items: flex-start; /* Align avatar top */
    gap: 10px;
    margin-bottom: 10px;
}

.create-post .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.create-post textarea {
    flex-grow: 1;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    min-height: 60px; /* Start height */
    resize: vertical; /* Allow vertical resize */
    outline: none;
}
.create-post textarea::placeholder {
    color: #aaa;
}
.create-post textarea:focus {
     border-color: #ff3c3c;
     box-shadow: 0 0 5px rgba(255, 60, 60, 0.3);
}


.create-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 50px; /* Align with textarea start */
}

.create-post-actions .icon-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px;
}
.create-post-actions .icon-btn:hover {
    color: #ff3c3c;
}

.create-post-actions .post-button {
    padding: 8px 20px; /* Smaller button */
    font-size: 0.9rem;
}


/* --- Individual Posts --- */
.community-feed {
    margin-top: 30px; /* Space below create post */
}

.post .avatar { /* Style for avatars in posts */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid #333;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 15px 15px 10px 15px;
}

.post-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.post-user-info .username {
    color: white;
    font-weight: bold;
    text-decoration: none;
}
.post-user-info .username:hover {
    text-decoration: underline;
    color: #eee;
}

.post-user-info .timestamp {
    font-size: 0.8em;
    color: #aaa;
}

.post-options-btn { /* Optional: Style for ... button */
    margin-left: auto; /* Pushes button to the right */
    background: none;
    border: none;
    color: #aaa;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px;
}
.post-options-btn:hover {
    color: white;
}


.post-body {
    padding: 0 15px 15px 15px; /* Padding below header */
}

.post-text {
    color: #eee;
    margin-bottom: 15px; /* Space below text if no media */
    line-height: 1.6; /* Improve readability */
    white-space: pre-wrap; /* Respect line breaks in text */
}

.post-media {
    display: block; /* Make image block level */
    max-width: 100%; /* Ensure image is responsive */
    margin-top: 15px;
    border-radius: 6px; /* Rounded corners for media */
    border: 1px solid #333;
}

.post-footer {
    border-top: 1px solid #333;
    padding: 10px 15px;
}

.post-footer .actions {
    display: flex;
    justify-content: space-around; /* Evenly space buttons */
    align-items: center;
}

.action-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex; /* Align icon and text */
    align-items: center;
    gap: 6px; /* Space between icon and text */
}

.action-btn:hover {
    background-color: #333;
    color: white;
}

.action-btn i { /* Styling for Font Awesome icons */
    font-size: 1.1rem; /* Adjust icon size */
    vertical-align: middle;
}

.action-btn .count {
    margin-left: 4px; /* Space before count */
    font-size: 0.85rem;
    color: #aaa;
}

.like-btn:hover, .like-btn.active { /* Style for active like */
    color: #ff3c3c;
}

/* Remove old placeholder style if it exists */
.post-content-placeholder {
    display: none; /* Hide the old placeholder */
}