/* Global Styles */
body {
    background-color: #000;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
}

/* Header Buttons */
.button-container {
    display: flex;
    justify-content: space-around;
    padding: 10px;
}

.rounded-button {
    text-align: center;
    font-weight: 800;
    background-color: #f7ffb8;
    color: red;
    width: 32%;
    border: 3px solid #000;
    border-radius: 12px;
    padding: 10px 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

/* Marquee */
marquee {
    background: #000;
}

/* Strip Section */
.strip {
    text-align: center;
    padding: 5px;
    background: #f7ffb8;
    font-weight: 700;
    border-radius: 20px;
    border: 2px dotted red;
    margin: 10px;
}

.strip b {
    font-size: 14px;
    line-height: normal;
}

/* Live Result Section */
.liveresult {
    background: radial-gradient(#750000, #000000);
    padding: 20px 10px;
    border: double 6px #fff;
    border-radius: 25px;
    margin: 15px 10px;
    text-align: center;
}

.gamename {
    font-size: 24px;
    color: #fff;
    font-weight: 700;
    margin-bottom: 5px;
}

.gameresult {
    font-size: 48px;
    color: #f7ff00;
    font-weight: 800;
}

.timefont {
    color: #ff0;
    font-size: 14px;
}

/* Search Form */
#search-form {
    width: 95%;
    margin: 15px auto;
    background-color: #212529;
    text-align: center;
    border-radius: 12px;
    padding: 12px;
}

#month,
#year,
#search {
    width: 30%;
    margin: 5px 1%;
    height: 40px;
    font-size: 0.9em;
    font-weight: 700;
    padding: 8px;
    border-radius: 5px;
}

/* Game Grid */
.row {
    margin: 10px;
}

.column {
    float: left;
    width: 50%;
    text-align: center;
    padding: 12px 5px;
    border: 1px solid #000;
    background-color: #030;
}

.row:after {
    content: "";
    display: table;
    clear: both;
}

.todays-result-number {
    display: inline-block;
    position: relative;
    width: 45px;
    height: 30px;
    background-color: #fdffd4;
    border-radius: 50px;
    margin-top: 5px;
}

.number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: red !important;
    font-size: 18px;
    font-weight: 800;
}

/* Tables */
.chart-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background-color: #fff;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.chart-table thead tr {
    background: linear-gradient(180deg, #ffff79 0%, #f7ff00 100%);
}

.chart-table td {
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    font-weight: 500;
}

.chart-table td:last-child {
    border-right: none;
}

/* Monthly Chart Specific Styles (Matching User Image) */
.monthly-chart-table {
    width: 100%;
    background-color: #fff;
    /* Ensure white background for the whole table */
    border-collapse: collapse;
    margin-bottom: 30px;
    border: 1px solid #ccc;
}

.monthly-chart-table .monthly-header {
    background-color: #000;
    /* Black background for headers as seen in image */
    color: red;
    /* Red text for headers */
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
    text-align: center;
    padding: 10px 5px;
    border-right: 1px solid #333;
    border-bottom: 2px solid red;
}

.monthly-chart-table td {
    background-color: #fff;
    /* Explicit white background for cells */
    color: #000;
    /* Black text for results */
    font-weight: 700;
    text-align: center;
    padding: 8px 4px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.monthly-chart-table .tableside {
    background-color: #eee;
    color: #333;
    font-weight: 800;
    border-right: 2px solid #ccc !important;
}

.monthly-chart-table tr:hover td {
    background-color: #f0f0f0;
}

.tablegamename {
    color: #cc0000;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px !important;
    border-bottom: 2px solid #cc0000 !important;
}

.tableside {
    background-color: #f9f9f9;
    color: #333;
    font-weight: 700;
    border-right: 2px solid #ddd !important;
}

.chart-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.chart-table tbody tr:hover {
    background-color: #fffde7;
    transition: background-color 0.2s ease;
}

/* Ensure mobile responsiveness */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* Article Content */
.article {
    background: #fff;
    text-align: justify;
    padding: 15px;
    font-size: 16px;
    line-height: 1.6;
    margin: 10px;
    border-radius: 10px;
}

.article h1 {
    font-size: 24px;
    color: red;
    padding-bottom: 10px;
    margin-top: 0;
}

.article b {
    color: red;
}

.article h2 {
    font-size: 20px;
    color: red;
    padding-bottom: 8px;
}

/* Footer Section */
.footer {
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    padding: 20px 10px;
    margin-top: 20px;
}

.footer a {
    color: #000;
}

/* History Tabs */
.satta-records {
    font-weight: 700;
    text-align: center;
    margin: 15px 10px;
    background-color: red;
    border: 2px solid #000;
    padding: 10px;
    color: #f9f9f9;
    font-size: 18px;
    border-radius: 15px;
}

.chartfoot {
    background-color: #fff;
    color: red;
    border: solid 2px;
    font-size: 16px;
    font-weight: 700;
    padding: 8px;
    border-radius: 15px;
    margin: 5px 10px;
    display: inline-block;
}

/* Floating Refresh Button */
.refreshButton {
    text-decoration: none;
    padding: 8px 15px;
    background-color: #fff;
    color: #30051c;
    border: 4px inset red;
    font-weight: 700;
    font-style: italic;
    font-size: 1.2em;
    border-radius: 12px;
    position: fixed;
    bottom: 20px;
    right: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* Accordion */
.accordion-item {
    background-color: #fff;
    border-radius: 10px;
    margin: 10px;
    overflow: hidden;
}

.accordion-item-header {
    font-size: 16px;
    background-color: red;
    color: #fff;
    padding: 15px;
    cursor: pointer;
    position: relative;
}

.accordion-item-header:hover {
    background-color: #030;
}

.accordion-item-header::after {
    content: '\002B';
    position: absolute;
    right: 15px;
}

.accordion-item-header.active::after {
    content: "\2212";
}

.accordion-item-body {
    max-height: 0;
    display: none;
}

.accordion-item-body-content {
    padding: 15px;
    background-color: #f5f5f5;
    font-size: 14px;
    color: #000;
}

/* Responsive Overrides */
@media (max-width: 480px) {
    .rounded-button {
        width: 31%;
        font-size: 12px;
    }

    .gamename {
        font-size: 20px;
    }

    .gameresult {
        font-size: 36px;
    }

    .column {
        width: 50%;
    }

    /* Keeping 2 columns as per common satta design */
    #month,
    #year,
    #search {
        width: 95%;
        margin: 5px auto;
        display: block;
    }
}

/* Yearly Chart Styles */
.yearly-chart-title {
    font-weight: bold;
    font-family: 'Times New Roman', serif;
    text-align: center;
    margin: 20px 10px 10px 10px;
    background-color: darkred;
    border: 2px solid #fff;
    padding: 10px;
    color: #fff;
    font-size: 22px;
    border-radius: 10px;
}

#livechart {
    border-collapse: collapse;
    width: 100%;
    background-color: #fff;
}

#livechart td,
#livechart th {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#livechart td {
    color: #000;
    font-size: 15px;
    font-weight: bold;
}

.tabledate {
    background-color: #11406f;
    color: white !important;
}

#livechart th {
    background-color: #11406f;
    color: white;
    padding: 10px 5px;
}

.yearly-result-cell {
    font-family: 'Times New Roman', serif;
}

#yearly-chart-container {
    margin: 20px 10px;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Premium Yearly Chart Fixes */
.yearly-chart-title {
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    text-align: center;
    margin: 20px 10px;
    background: linear-gradient(90deg, #1e3a8a 0%, #11406f 100%);
    border: 2px solid #f7ff00;
    padding: 15px;
    color: #f7ff00;
    font-size: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.yearly-chart-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background-color: #fff;
    border: 2px solid #11406f !important;
}

.yearly-chart-table thead th {
    background-color: #11406f;
    color: #f7ff00;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 5px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #f7ff00;
}

.yearly-chart-table .tabledate {
    background-color: #11406f !important;
    color: #fff !important;
    font-weight: 800;
    width: 40px;
    border-right: 2px solid #f7ff00 !important;
}

.yearly-chart-table td {
    padding: 8px 4px;
    font-size: 16px;
    font-family: 'Times New Roman', serif;
    color: #000;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.yearly-chart-table tr:nth-child(even) {
    background-color: #f1f5f9;
}

.yearly-chart-table tr:hover {
    background-color: #e0e7ff !important;
    transition: background-color 0.2s ease;
}

.yearly-result-cell {
    min-width: 35px;
}

.table-container::after {
    content: ' Scroll to see full yearly chart ';
    display: block;
    text-align: center;
    font-size: 11px;
    color: #64748b;
    margin-top: 8px;
    font-weight: 600;
}

@media (min-width: 992px) {
    .table-container::after {
        display: none;
    }
}

/* Archive Grid Styles */
.archive-section {
    margin: 20px 10px;
    background-color: #0c0d10;
    /* Dark premium background */
    padding: 15px 5px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.archive-header {
    background-color: #1a1b1e;
    color: #fff;
    font-weight: 800;
    text-align: center;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #333;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    /* 12 columns for desktop */
    gap: 2px;
    margin-bottom: 25px;
}

.archive-card {
    background-color: #212529;
    color: #e5e7eb;
    text-align: center;
    padding: 12px 2px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid #2d3035;
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.archive-card:hover {
    background-color: #cc0000;
    color: #ffffff;
    border-color: #ff3333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(204, 0, 0, 0.4);
    z-index: 10;
}

.archive-full-row {
    grid-column: 1 / -1;
    background-color: #1a1b1e;
    border: 1px solid #333;
}

/* Specific overrides for 12 columns on large screens */
@media (max-width: 1024px) {
    .archive-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 768px) {
    .archive-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .archive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1px;
    }

    .archive-card {
        font-size: 11px;
        padding: 10px 1px;
    }
}