/* --- 1. GLOBAL SETTINGS & RESET --- */
body {
    margin: 0; 
    font-family: "Heebo", sans-serif;
    background: linear-gradient(135deg, #07a973, #0e2ca6);
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-align: center;
    z-index: 1;
}

/* Container for standard pages to center content */
main, .container, .results-body-container {
    width: 95%;
    max-width: 1000px; 
    margin: 0 auto;
    padding-bottom: 50px;
}

.bg-txt {
    position: fixed;
    bottom: 0px;
    right: 0px;
    font-size: clamp(200px, 40vw, 700px);
    font-weight: 800;
    color: #14536877;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    mix-blend-mode: lighten;
    transform: translate(0, 50%);
}

.row-flex {
    display: flex;
    flex-direction: row;
    gap: 60px;
    align-items: stretch;
}

/* --- 2. INFO BLOCKS (IMAGE + TEXT GROUP) --- */
.info-block {
    display: flex;
    flex-direction: row;
    gap: 40px;
    padding: 30px;
    background-color: #114254;
    border-radius: 24px;
    margin-bottom: 30px;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.info-img {
    max-width: 280px;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
}

.info-text {
    flex: 1;
}

.info-text p {
    font-size: 18px;
    background-color: #f4f4f4;
    color: rgba(0, 0, 0, 0.899);
    padding: 20px;
    border-radius: 15px;
    text-align: justify;
    line-height: 1.5;
    margin: 0;
}

.button-container {
    margin-top: 40px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 80%;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;

}

main h2 {
    font-size: 48px;
    margin: 0;
    font-weight: 100;

}

/* --- 3. ADMIN PANEL & SIDEBAR --- */
.admin_body {
    margin: 0;
    padding-top: 100px;
    background: #114254;
    min-width: 0; /* Changed from 1200px to allow mobile responsiveness */
}

.admin_page {
    margin: 0;
    padding: 20px 20px 20px 270px; /* Space for fixed sidebar */
    text-align: left;
    transition: 0.3s ease;
}

.sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    bottom: 0;
    width: 250px;
    background-color: #09313f;
    color: #fff;
    padding: 20px;
    box-sizing: border-box;
    z-index: 999;
    transition: transform 0.3s ease;
}

.admin_page button, .admin_page a, .admin_page h3 {
    display: flex;
    background: #145368;
    padding: 15px 15px;
    border-radius: 8px;
    color: #f4f4f4;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: 0.2s ease;
    border: none;
    width: auto;
    align-self: flex-start;
    font-size: 16px;
    margin: 5px 0;

}

.sidebar h1 { font-size: 32px; font-style: italic; font-weight: 600; margin-bottom: 20px; }
.sidebar nav { display: flex; flex-direction: column; gap: 10px; }

.sidebar nav a, .sidebar .admin_logout {
    display: block;
    background: #145368;
    padding: 12px 15px;
    border-radius: 8px;
    color: #f4f4f4;
    text-decoration: none;
    font-weight: 300;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: 0.2s ease;
}

.sidebar .admin_logout { background: #6d0707; margin-top: 20px; }
.sidebar nav a:hover { transform: translateX(5px); filter: brightness(1.2); }

/* Hamburger Menu Logic */
.hamburger {
    display: none; 
    position: fixed;
    top: 25px;
    left: 20px;
    z-index: 1001;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    z-index: 1000;
}

/* --- 4. TABLES --- */
.table_container { 
    width: 100%; 
    overflow-x: auto; 
    margin-bottom: 20px;
    border-radius: 8px;
    -webkit-overflow-scrolling: touch; 
}

.admin-table, .dashboard-table, .live-results { 
    width: 100%; 
    border-collapse: collapse; 
}

.admin-table td, .results-section td { border: 1px solid #ccc; padding: 8px; text-align: center; font-size: 14px; }
.admin-table th, .results-section th { font-size: 16px; font-weight: 800; border: 1px solid #ccc; padding: 10px; background: #09313f; }

/* Table specific widths from original snippet */
.admin-table th:nth-child(1), .admin-table td:nth-child(1) {width: 50px;}
.admin-table th:nth-child(2), .admin-table td:nth-child(2) {width: 80px;}
.admin-table th:nth-child(3), .admin-table td:nth-child(3) {width: 200px;}

.dashboard-table { width: 100%; max-width: 600px; border: 1px solid #ccc; }
.dashboard-table td { padding: 15px; background: rgba(255,255,255,0.05); }
.dashboard-table th { font-size: 18px; font-weight: 800; background: #09313f; padding: 4px 0px; text-align: center; white-space: nowrap; }

.live-results { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid #ccc; white-space: nowrap; }
.live-results th { font-size: 20px; font-weight: 800; background: #094883; padding: 4px 4px; }
.live-results td { padding: 6px 3px; text-align: center; font-size: 16px; }
.live-results th:nth-child(1), .live-results td:nth-child(1) {width: 50px;}

.results-section { position: relative; left: 0px; display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.results-section table { table-layout: auto; border-collapse: collapse; padding: 0 5px; }
.results-section th { font-size: 18px; font-weight: 800; border: 1px solid #ccc; padding: 4px 6px; background: #09313f; }
.results-section td { border: 1px solid #ccc; padding: 5px 6px; text-align: center; font-size: 14px; }

/* --- 5. FORMS & UI --- */

.admin_page h2 {
    background: #145368; color: white; padding: 10px 20px; display: inline-block;
    border-radius: 8px; border-width: 5px; box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    font-size: 18px; align-self: flex-start;
}



.admin_page input[type='checkbox'] { width: 30px; height: 30px; border-radius: 8px; accent-color: #4caf50; }

input[type='checkbox'] { width: 30px; height: 30px; border-radius: 8px; accent-color: #4caf50; }

.form-overlay { display: none; }

.form-overlay.active { display: flex; }


.form-section { 
    background: rgba(255, 255, 255, 0.1); 
    padding: 30px; 
    border-radius: 15px; 
    backdrop-filter: blur(10px); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    margin-bottom: 30px;
}

.form-row { display: flex; gap: 20px; margin: 15px 0; }
.form-group { flex: 1; display: flex; flex-direction: column; text-align: left; }
.form-group label { margin-bottom: 8px; font-weight: 600; }


.form-section input, .form-section select { 
    padding: 12px; 
    border-radius: 8px; 
    border: none; 
    font-size: 16px; 
}

.btn, .form-section button {
    background: rgba(255, 255, 255, 0.2); 
    color: white; 
    padding: 15px 25px;
    font-size: 18px; 
    border-radius: 10px; 
    text-decoration: none; 
    transition: 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.4); 
    cursor: pointer;
}

.btn:hover { background: rgba(255, 255, 255, 0.4); transform: translateY(-2px); }

/* --- 6. TOPBAR --- */
.topbar {
    position: fixed; top: 0; left: 0; width: 100%; height: 80px; background: #094883;
    display: flex; justify-content: space-between; align-items: center; padding: 0 30px;
    z-index: 999; box-shadow: 0 4px 10px rgba(0,0,0,0.2); box-sizing: border-box;
}

.topbar a { color: white; margin-left: 20px; text-decoration: none; font-weight: 600; }


header h1 { font-size: clamp(2rem, 10vw, 64px); font-style: italic; font-weight: 800; margin-top: 120px; }

header h2 { font-size: clamp(2rem, 10vw, 64px); font-style: italic; font-weight: 800; margin-top: 50px; }

header p { font-size: clamp(1rem, 5vw, 32px); opacity: 0.8; font-style: italic; }

/* --- 7. FOOTER --- */
footer { padding: 40px 0; opacity: 0.7; font-size: 14px; }
hr { align-self: stretch; height: 3px; margin: 20px 0; background-color: #ffffff; border-radius: 10px; }

/* --- 8. RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 850px) {
    /* Info Blocks */
    .info-block { flex-direction: column; text-align: center; }
    .info-img { width: 80%; max-width: 100%; }

    /* Forms */
    .form-row { flex-direction: column; gap: 0; }

    /* Topbar */
    .topbar { height: 80px; padding: 0 15px; flex-direction: column; text-align: center;} 
    .topbar nav { margin-top: 10px; font-size: 16px; flex-wrap: wrap; justify-content: center; gap: 10px; padding: -10px;} /* Hide main nav on Admin mobile to avoid clutter */

    /* Admin Sidebar Toggle Logic */
    .hamburger { display: flex; }
    .admin_page { padding-left: 20px; padding-right: 20px; }
    .sidebar { transform: translateX(-100%); top: 0; padding-top: 80px; }
    
    
    /* This connects to the <input type="checkbox" id="menu-toggle"> in HTML */
    #menu-toggle:checked ~ .sidebar { transform: translateX(0); }
}