/* Globalne style */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #e0f2f7 0%, #bbdefb 100%); /* Jaśniejszy, niebieski gradient */
    color: #212121;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Dark mode styles for body */
body.dark-mode {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%); /* Głębokie, ciemne niebieskie */
    color: #e0e0e0;
}

/* Header styles */
.header {
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border: 2px solid #64b5f6; /* Jasny niebieski */
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInTop 1s ease-out forwards;
    position: relative;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

@keyframes fadeInTop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode styles for header */
body.dark-mode .header {
    background-color: #263238; /* Bardzo ciemny szaroniebieski */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-color: #37474f; /* Ciemniejszy szaroniebieski */
}

/* Main headings (H1) in header */
.header h1 {
    font-family: 'Montserrat', sans-serif;
    color: #1565c0; /* Głęboki niebieski */
    font-size: 3.2em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

/* Dark mode styles for H1 in header */
body.dark-mode .header h1 {
    color: #90caf9; /* Jasny niebieski */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Current time display (if present) */
#current-time {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6em;
    color: #2196f3; /* Standardowy niebieski */
    font-weight: 700;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: color 0.5s ease;
}

#current-time i {
    color: #ff9800; /* Pomarańczowy dla ikony zegara */
    transition: color 0.5s ease;
}

/* Dark mode styles for current time */
body.dark-mode #current-time {
    color: #bbdefb; /* Jaśniejszy niebieski */
}
body.dark-mode #current-time i {
    color: #ffcc80; /* Pomarańczowy w trybie ciemnym */
}

/* Navigation styles */
#main-nav {
    width: 100%;
    max-width: 900px;
    background-color: #1976d2; /* Ciemniejszy niebieski dla nawigacji */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

#main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1em;
    padding: 8px 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
}

#main-nav a:hover {
    background-color: #2196f3; /* Jaśniejszy niebieski przy najechaniu */
    transform: translateY(-2px);
}

/* Dark mode styles for navigation */
body.dark-mode #main-nav {
    background-color: #0d47a1; /* Głęboki niebieski */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
body.dark-mode #main-nav a:hover {
    background-color: #1565c0; /* Nieco jaśniejszy niebieski przy najechaniu */
}

/* Content section styles */
.content-section {
    width: 100%;
    max-width: 900px;
    margin-top: 20px;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border: 2px solid #64b5f6; /* Jasny niebieski */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInBottom 1s ease-out 0.3s forwards;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

@keyframes fadeInBottom {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode styles for content section */
body.dark-mode .content-section {
    background-color: #263238; /* Bardzo ciemny szaroniebieski */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-color: #37474f; /* Ciemniejszy szaroniebieski */
}

/* Headings within content section */
.content-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8em;
    color: #1565c0; /* Głęboki niebieski */
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    transition: color 0.5s ease;
}

.content-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: #2196f3; /* Standardowy niebieski */
    bottom: 0;
    border-radius: 2px;
    transition: background-color 0.5s ease;
}

/* Dark mode styles for headings within content section */
body.dark-mode .content-section h2 {
    color: #90caf9; /* Jasny niebieski */
}
body.dark-mode .content-section h2::after {
    background-color: #64b5f6; /* Jaśniejszy niebieski */
}

.content-section p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #424242;
    margin-bottom: 1em;
    text-align: justify;
    transition: color 0.5s ease;
}

body.dark-mode .content-section p {
    color: #cfd8dc;
}

/* Table styles (for tabela.html) */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden; /* Ensures border-radius applies to table */
}

.styled-table thead {
    background-color: #1976d2;
    color: #fff;
}

body.dark-mode .styled-table thead {
    background-color: #0d47a1;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

body.dark-mode .styled-table th,
body.dark-mode .styled-table td {
    border-bottom: 1px solid #424242;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

body.dark-mode .styled-table tbody tr:nth-of-type(even) {
    background-color: #37474f;
}

.styled-table tbody tr:hover {
    background-color: #e0e0e0;
}

body.dark-mode .styled-table tbody tr:hover {
    background-color: #455a64;
}

/* Footer styles */
.footer {
    margin-top: 40px;
    padding: 20px;
    background-color: #1a237e;
    color: #ffffff;
    width: 100%;
    max-width: 900px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

body.dark-mode .footer {
    background-color: #0d47a1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.footer p {
    margin: 0;
    font-size: 0.9em;
    color: #e0e0e0;
}

.social-media-links {
    margin-top: 10px;
}

.social-media-links a {
    color: #ffffff;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.social-media-links a:hover {
    color: #ffeb3b; /* Jasnożółty na najechaniu */
    transform: translateY(-3px);
}

/* Theme Toggle Button */
#theme-toggle {
    background-color: #2196f3;
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed; /* Keep it fixed for easy access */
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

body.dark-mode #theme-toggle {
    background-color: #1565c0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

#theme-toggle:hover {
    background-color: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode #theme-toggle:hover {
    background-color: #0d47a1;
}

/* Countdown (specific to index.html and druzyny.html if needed) */
.countdown {
    font-size: 2.2em;
    font-weight: bold;
    color: #e64a19;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px; /* Added gap for better spacing */
}

.countdown div {
    margin: 0 10px;
    background-color: #ffccbc;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    min-width: 80px; /* Ensure consistent width */
    text-align: center;
}

.countdown span {
    display: block;
    font-size: 0.5em;
    color: #d84315;
    margin-top: 5px;
}

body.dark-mode .countdown {
    color: #ff7043;
}
body.dark-mode .countdown div {
    background-color: #5d4037;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
body.dark-mode .countdown span {
    color: #ffab91;
}

/* Match schedule/live scores (specific to index.html) */
.match-schedule ul, .live-scores ul {
    list-style: none;
    padding: 0;
}

.match-schedule li, .live-scores li {
    background-color: #e8eaf6;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark-mode .match-schedule li, body.dark-mode .live-scores li {
    background-color: #3f51b5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.match-schedule li strong {
    color: #1a237e;
}

body.dark-mode .match-schedule li strong {
    color: #c5cae9;
}

.live-scores li span {
    font-weight: bold;
    color: #d32f2f;
}

body.dark-mode .live-scores li span {
    color: #ff8a65;
}

/* News updates (specific to index.html) */
.news-updates {
    margin-top: 20px;
    text-align: left;
    width: 100%;
}

.news-updates article {
    background-color: #e8eaf6;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark-mode .news-updates article {
    background-color: #3f51b5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.news-updates h3 {
    color: #1a237e;
    margin-top: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

body.dark-mode .news-updates h3 {
    color: #c5cae9;
}

.news-updates p {
    color: #424242;
    line-height: 1.6;
}

body.dark-mode .news-updates p {
    color: #cfd8dc;
}

/* Team members (specific to onas.html) */
.team-members {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.team-member {
    background-color: #e8eaf6;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 280px;
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .team-member {
    background-color: #3f51b5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.team-member img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #1a237e;
    transition: border-color 0.3s ease;
}

body.dark-mode .team-member img {
    border-color: #9fa8da;
}

.team-member h3 {
    color: #1a237e;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

body.dark-mode .team-member h3 {
    color: #c5cae9;
}

.team-member p {
    color: #616161;
    font-size: 0.9em;
    line-height: 1.5;
    transition: color 0.3s ease;
}

body.dark-mode .team-member p {
    color: #b0bec5;
}

.team-member a {
    display: inline-block;
    margin-top: 15px;
    color: #2196f3;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

body.dark-mode .team-member a {
    color: #90caf9;
}

.team-member a:hover {
    text-decoration: underline;
}

/* --- New styles for teams section on druzyny.html --- */
.teams-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.team-card {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .team-card {
    background-color: #37474f;
    border-color: #424242;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.team-name {
    padding: 15px 20px;
    margin: 0;
    background-color: #e3f2fd;
    color: #1565c0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4em;
    border-bottom: 1px solid #bbdefb;
    transition: background-color 0.3s ease, color 0.3s ease, border-bottom-color 0.3s ease;
}

body.dark-mode .team-name {
    background-color: #1e88e5;
    color: #e3f2fd;
    border-bottom-color: #2196f3;
}

.team-name:hover {
    background-color: #d0efff;
}

body.dark-mode .team-name:hover {
    background-color: #1976d2;
}

.team-name .expand-icon {
    transition: transform 0.3s ease;
}

.team-roster {
    padding: 0 20px; /* Initial padding, will grow with content */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}

.team-roster.active {
    max-height: 500px; /* Adjust based on expected content height */
    padding: 15px 20px;
}

.team-roster h4 {
    color: #1976d2;
    margin-top: 15px;
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1em;
    transition: color 0.5s ease;
}

body.dark-mode .team-roster h4 {
    color: #90caf9;
}

.team-roster ul {
    list-style: disc;
    margin: 0 0 10px 20px;
    padding: 0;
    color: #424242;
}

body.dark-mode .team-roster ul {
    color: #cfd8dc;
}

.team-roster li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.team-roster p {
    color: #424242;
    font-size: 0.95em;
    margin-bottom: 15px;
}

body.dark-mode .team-roster p {
    color: #cfd8dc;
}