/* Base styles */
body {
    background-color: #2d4129;
    background-image: url('http://www.sfdiscgolf.org/wp-content/uploads/2012/09/sfdgc_bkgd_03.jpg');
    background-repeat: repeat-x;
    background-position: top center;
    background-size: auto;
    font-family: Arial, sans-serif;
    color: #2d4029;
    font-size: 16px;
    margin: 0;
    padding: 0;
    text-align: left; /* Ensure default text alignment is left */
}

/* Main layout containers with improved centering */
#outerrim { 
    margin: 0 auto; 
    width: 100%; 
    display: flex;
    justify-content: center; /* Center horizontally */
}
#innerrim { 
    margin: 0 auto; 
    width: 100%;
    max-width: 990px; 
    min-width: 320px; /* More mobile-friendly minimum width */
}
#content {
    width: 100%;
}
#content .padder {
    margin-left: 0; /* Removed left margin that was pushing content right */
    margin-right: 0;
    padding: 15px; /* Reduced for mobile */
    padding-top: 14px;
    text-align: left; /* Ensure content is left-aligned */
}

/* Heading styles */
h1 { 
    font-family: Arial, sans-serif; 
    font-size: 28px;
    font-weight: bold; 
    color: #2d4029;
    text-align: center; /* Keep title centered */
    margin-bottom: 20px;
    width: 100%; /* Ensure full width */
}

/* Header container improvements */
.header-container {
    overflow: hidden;
    margin-bottom: 10px;
    width: 100%; /* Ensure full width */
    display: flex;
    justify-content: space-between; /* Better spacing for h2 and timestamp */
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

h2 { 
    font-family: Arial, sans-serif; 
    font-size: 24px;
    font-weight: bold; 
    color: #FFFFFF;
    background: rgba(45, 65, 41, 0.9);
    display: inline-block;
    padding: 6px 12px;
    margin: 0;
}

.timestamp {
    text-align: center;
    color: #FFFFFF;
    background: rgba(45, 65, 41, 0.9);
    display: inline-block;
    padding: 4px 10px;
    font-size: 16px;
    border-radius: 4px;
    margin-left: 10px;
}

/* Card styles */
.card { 
    background: #ffffff; 
    padding: 15px; 
    margin-bottom: 15px; 
    border: 1px solid #ededed; 
    font-size: 16px;
    width: 100%;
    max-width: 100%; /* Prevent overflow */
    box-sizing: border-box; /* Include padding in width calculation */
    text-align: left;
}

.card-header { 
    background: #2d4129; 
    color: #ffffff; 
    padding: 10px; 
    font-weight: bold; 
    font-size: 18px;
    text-align: left;
}

.card-content {
    text-align: left;
}

/* List styles */
.team-list { 
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    text-align: left;
}

.team-list li { 
    padding: 8px 0; 
    border-bottom: 1px solid #ededed; 
    font-size: 16px;
    text-align: left;
}

.player { 
    margin-left: 15px; 
    color: #2d4029; 
    font-size: 14px;
    text-align: left;
}

.no-data { 
    text-align: center; 
    color: #888888; 
    font-style: italic; 
    padding: 20px; 
    font-size: 16px;
}

.open-slots {
    background-color: #ffff99;
    display: block;
    padding: 4px 8px;
    margin: 4px 0;
    text-align: left;
}

.mando-highlight {
    background-color: #ffff99; /* Light yellow highlight, matching open-slots */
}

.preliminary-notice {
    color: #ff0000;
    font-size: 24px; /* Increased from 18px to make it larger */
    font-weight: bold; /* Added bold styling */
    text-align: center;
    margin-top: -10px;
    margin-bottom: 20px;
}

/* Override any external CSS that might be causing right-justification */
ul, ol {
    text-align: left !important;
    padding-left: 20px;
}

.team-list ul {
    padding-left: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #innerrim {
        min-width: 100%;
    }
    
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timestamp {
        margin-left: 0;
        margin-top: 5px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .card-header {
        font-size: 16px;
    }
    
    .team-list li {
        font-size: 14px;
    }
    
    .player {
        font-size: 12px;
    }
    
    .preliminary-notice {
        font-size: 20px; /* Adjusted for mobile to be slightly smaller but still bold and large */
    }
}

@media (min-width: 768px) {
    #content .padder {
        padding: 24px; /* Restore for desktop */
        padding-top: 14px;
    }
    
    .preliminary-notice {
        font-size: 24px; /* Ensure desktop retains larger size */
    }
}
