body {
    background: url(bg.png) #555555 repeat-x;
    font-family: verdana;
    font-size: 8pt;
    margin: 0;
    padding: 0;
    text-align: center;
}

/* 1. The Wrapper: Now acts as a Flex container for the whole page */
.wrapper {
    background: #434343;
    border-left: 2px solid #380000;
    border-right: 2px solid #380000;
    margin: 0 auto;
    width: 1030px;
    min-height: 100vh; /* Changed from 100% to fill screen */
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* 2. Banner: Stays centered at the top */
.banner {
    background: url(banner4.png);
    border: 1px solid #fff;
    height: 150px;
    width: 1000px;
    margin: 10px auto;
    opacity: 0.8;
    flex-shrink: 0; /* Prevents banner from squishing */
}
/* Container for the 3 columns */
.main-container {
    display: flex;
    flex-wrap: wrap; /* Allows columns to stack on mobile */
    gap: 15px;
    padding: 10px;
    align-items: flex-start;
}

/* Side Navigation Styling */
.left-nav, .right-nav {
    flex: 0 0 200px; /* Fixed width on desktop */
    min-width: 200px;
}

.left-nav ul, .right-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #380000;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* Glossy Red Headers */
.top-header, .header {
    background: linear-gradient(to bottom, #d64545 0%, #973f3f 100%);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    border-bottom: 1px solid #380000;
    text-transform: uppercase;
    font-size: 0.85em;
}

/* Menu Links */
.left-nav li a, .right-nav li a {
    display: block;
    padding: 8px 12px;
    color: #973f3f;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.left-nav li a:hover, .right-nav li a:hover {
    background: #fdf2f2;
    padding-left: 18px; /* Slight slide effect */
    color: #d64545;
}

/* Trainer Card specific styling */
.trainer-card {
    padding: 15px;
    text-align: center;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.trainer-card img {
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
}

/* Center Content Box */
.content {
    flex: 1; /* Takes up remaining space */
    min-width: 300px;
    background: #fff;
    border: 1px solid #380000;
    border-radius: 8px;
    min-height: 500px;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 800px) {
    .main-container {
        flex-direction: column; /* Stacks everything vertically */
    }

    .left-nav, .right-nav, .content {
        flex: 1 1 100%; /* Sidebars take full width on mobile */
        width: 100%;
    }

    .left-nav {
        order: 2; /* Content first, then left menu, then right */
    }
    .content {
        order: 1;
    }
    .right-nav {
        order: 3;
  
}

/* Keep your existing list styling for the content-box */
.content li.main {
    min-height: 400px;
    background: #D78E8E;
    border: 1px solid #380000;
    padding: 15px;
}

/* Keep your existing header styling */
.content li.header, .left-nav li.header, .right-nav li.header, .left-nav li.top-header, .right-nav li.top-header {
    padding: 8px;
    background: url(red-header.png) #973F3F;
    color: #fff;
    font-weight: bold;
    border: 1px solid #380000;
    text-align: center;
}

/* Trainer Card specific fixes to ensure it fits the 160px sidebar */
.trainer-card {
    background: #f8f9fa;
    border: 2px solid #380000;
    border-radius: 10px;
    margin: 10px 0;
    font-size: 7pt;
}

.trainer-stats-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stacked for thin sidebar */
    gap: 5px;
    padding: 5px;
}
/* Content Area */
.content {
    flex: 1;
    background: #f4f4f4;
    color: #333;
    border-radius: 8px;
    padding: 15px;
    min-width: 0; /* Prevents overflow */
}

/* Party Table - Mobile Scrollable */
.party-container {
    overflow-x: auto;
    background: #ddd;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.button {
    display: inline-block;
    padding: 8px 15px;
    background: var(--accent-red);
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    margin: 5px;
}

/* Links */
a { color: #941010; text-decoration: none; font-weight: bold; }
a:hover { color: var(--primary-red); }

/* Tooltip Mobile Adjustment */
#info {
    background: var(--light-red);
    border: 2px solid var(--border-dark);
    padding: 10px;
    border-radius: 8px;
    z-index: 100;
}
/* Fix for unreadable white text on light backgrounds */
.content .main, 
.content .main td, 
.content .main center {
    color: #333333 !important; /* Dark Gray */
    line-height: 1.6;
    font-size: 14px;
}

/* Ensure the News Table text is also dark */
.content .main table td {
    color: #222222;
}

/* Fix for the 'into' class specifically */
.into {
    color: #333333;
    padding: 20px;
}

/* Header text should stay white since it has a red background */
.content .header {
    color: #ffffff !important;
}
/* Modern News Card */
.news-container {
    margin: 20px 0;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    overflow: hidden;
    background: #fff; /* Light background for readability */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.news-title-header {
    background: linear-gradient(to right, var(--accent-red), var(--primary-red));
    color: white;
    padding: 12px 15px;
    font-weight: bold;
    text-align: left;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--border-dark);
}

.news-body {
    display: flex;
    flex-direction: column; /* Stacks on mobile */
}

@media (min-width: 768px) {
    .news-body {
        flex-direction: row; /* Side-by-side on desktop */
    }
}

.news-poster-info {
    background: #f9f9f9;
    padding: 15px;
    width: 100%;
    border-bottom: 1px solid #eee;
    text-align: center;
    color: #333;
}

@media (min-width: 768px) {
    .news-poster-info {
        width: 180px;
        border-bottom: none;
        border-right: 1px solid #eee;
    }
}

.news-content-text {
    padding: 20px;
    flex: 1;
    text-align: left;
    color: #333;
    line-height: 1.7;
    font-size: 15px;
}

.news-poster-info img.avatar {
    width: 80px;
    height: 80px;
    border: 2px solid var(--primary-red);
    border-radius: 50%; /* Circular avatar look */
    background: white;
    margin-bottom: 10px;
}
/* Registration Form Styling */
.registration-form {
    margin-top: 20px;
}

.form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form-inputs {
    flex: 1;
    min-width: 250px;
}

.form-previews {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    margin-bottom: 15px;
    text-align: left;
}

.input-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--accent-red);
}

.input-group input, .input-group select, .preview-card select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
}

/* Preview Cards */
.preview-card {
    background: #f1f1f1;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.preview-card label {
    font-weight: bold;
    color: var(--accent-red);
    display: block;
    margin-bottom: 10px;
}

.preview-img-box {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    background: white;
    border-radius: 5px;
    border: 1px dotted #ccc;
}

.preview-img-box img {
    max-height: 80px;
}

/* Error Bubble */
.error-bubble {
    background: #ffdbdb;
    color: #a30000;
    padding: 15px;
    border-radius: 5px;
    border-left: 5px solid #a30000;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Button Styling */
.register-submit-btn {
    background: linear-gradient(to bottom, var(--primary-red), var(--accent-red));
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.register-submit-btn:hover {
    transform: scale(1.05);
}
/* Login Page Specifics */
.login-card {
    max-width: 400px;
    margin: 0 auto 30px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

/* Security Warning Styling */
.security-warning {
    background: #1a1a1a; /* Dark background */
    border: 2px solid #444;
    border-left: 5px solid #ff0000;
    border-radius: 8px;
    padding: 20px;
    margin-top: 40px;
    color: #eee;
    text-align: left;
}

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

.warning-img img {
    width: 80px;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
}

.warning-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.warning-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Error/Message Container */
.message-container .error {
    background: #ffebeb;
    color: #b71c1c;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ffcdd2;
    font-weight: bold;
}

@media (max-width: 600px) {
    .warning-flex {
        flex-direction: column;
        text-align: center;
    }
}
  /* The glass container for the party */
.party-stage {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    margin: 10px auto;
    width: 95%;
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px;
}

.party-slot {
    position: relative;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.1) 100%);
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.party-slot:hover {
    transform: translateY(-5px);
    border-color: #d64545;
}

.party-slot img.poke-icon {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.3));
}

.party-slot img.empty-ball {
    width: 30px;
    opacity: 0.3;
}
  /* Base Fancy Button */
.btn-fancy {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    color: white !important;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Red Button (Battle/Action) */
.btn-red {
    background: linear-gradient(to bottom, #ff4b2b, #ff416c);
}
.btn-red:hover {
    background: linear-gradient(to bottom, #ff416c, #ff4b2b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 75, 43, 0.4);
}

/* Blue Button (Message/Info) */
.btn-blue {
    background: linear-gradient(to bottom, #00c6ff, #0072ff);
}
.btn-blue:hover {
    background: linear-gradient(to bottom, #0072ff, #00c6ff);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 198, 255, 0.4);
}

/* Green "Catch" Button */
.btn-catch {
    background: linear-gradient(to bottom, #56ab2f, #a8e063);
    border: 2px solid #fff;
}
.btn-catch:hover {
    background: linear-gradient(to bottom, #a8e063, #56ab2f);
    transform: scale(1.05);
    box-shadow: 0 0 15px #a8e063;
}
