/* Universal Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #2c3e50;
    color: #ecf0f1;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 95%;
    margin: 20px auto;
    padding: 10px;
}

h1, h2 {
    text-align: center;
    color: #f39c12;
    margin: 10px 0;
}

/* Header Styles */
.header {
    background-color: #34495e;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    margin: 0;
    font-size: 24px;
    color: #f39c12;
}

.header #login-link {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    border: 1px solid #ecf0f1;
    border-radius: 5px;
}

/* Today Result & Old Results Sections */
.today-result, .old-results, .time-schedule {
    background-color: #34495e;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.date-header {
    background-color: #f39c12;
    color: #2c3e50;
    text-align: center;
    font-weight: bold;
    padding: 10px;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.date-header h2 {
    margin: 0;
    color: #2c3e50;
}

.live-animation {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1em;
    font-weight: bold;
    color: #2c3e50;
}

.blinking-dot {
    color: #ff0000;
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* New: Centering the date */
.date-container {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: #ecf0f1;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.result-box-item {
    background-color: #2c3e50;
    border: 2px solid #f39c12;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
}

.result-box-item .patti {
    font-size: 16px;
    font-weight: bold;
    color: #ecf0f1;
    margin-bottom: 5px;
}

.result-box-item .single {
    font-size: 24px;
    font-weight: bold;
    color: #ecf0f1;
}

/* Old Results Section */
.old-results-container {
    margin-top: 20px;
}

.old-results-day {
    background-color: #2c3e50;
    border: 1px solid #f39c12;
    border-radius: 5px;
    margin-bottom: 15px;
    padding: 10px;
}

.old-results-day .result-date {
    background-color: #f39c12;
    color: #2c3e50;
    text-align: center;
    font-weight: bold;
    padding: 5px;
    border-radius: 3px;
    margin-bottom: 10px;
}

.old-results-day .results-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    overflow-x: auto;
}

/* Time Schedule Section */
.result-schedule-container {
    background-color: #34495e;
    color: #ecf0f1;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.result-schedule-container h2 {
    color: #f39c12;
    margin-bottom: 15px;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.schedule-item {
    background-color: #2c3e50;
    border: 1px solid #f39c12;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.baji-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #f39c12;
    margin-bottom: 5px;
}

.result-time {
    font-size: 1em;
}

/* Add vertical divider */
.schedule-grid .schedule-item:not(:last-child)::after {
    content: '';
    display: block;
    width: 2px;
    height: 100%;
    background-color: #f39c12;
    position: absolute;
    right: -6px;
    top: 0;
    transform: translateX(50%);
}

/* Admin panel styles */
.admin-header {
    background-color: #34495e;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header .header-logo img {
    height: 40px;
}

.admin-header .header-title h1 {
    font-size: 24px;
    color: #f39c12;
}

.admin-header .header-buttons button {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.admin-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 10px;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-button {
    flex-grow: 1;
    background-color: #2c3e50;
    color: #ecf0f1;
    border: 1px solid #f39c12;
    padding: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.tab-button.active {
    background-color: #f39c12;
    color: #2c3e50;
}

.tab-button:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.tab-button:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.tabs-container {
    background-color: #34495e;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.admin-section h2, .admin-section h3 {
    text-align: center;
    color: #f39c12;
    margin-bottom: 15px;
}

.admin-section form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #2c3e50;
    color: #ecf0f1;
}

.admin-section button {
    background-color: #f39c12;
    color: #2c3e50;
    cursor: pointer;
    font-weight: bold;
    padding: 12px;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.admin-section button:hover {
    background-color: #e67e22;
}

.admin-section-inner {
    background-color: #2c3e50;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.message {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
}

hr {
    border: 0;
    height: 1px;
    background: #555;
    margin: 25px 0;
}

/* Report & Graph Styles */
#reportContainer table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#reportContainer th, #reportContainer td {
    border: 1px solid #f39c12;
    padding: 10px;
    text-align: center;
}

#reportContainer th {
    background-color: #f39c12;
    color: #2c3e50;
}

#reportContainer tr:nth-child(even) {
    background-color: #34495e;
}

/* New: Patti Chart Styles */
.lucky-number-patti-list {
    margin: 20px auto;
    max-width: 95%;
    text-align: center;
    color: #ffffff;
    padding: 20px;
}

.lucky-number-patti-list h2 {
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #f39c12;
}

.patti-chart-container {
    background-color: #34495e;
    border: 1px solid #f39c12;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    overflow-x: auto;
}

.patti-table {
    display: inline-block;
    min-width: 100%;
}

.patti-table table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
}

.patti-table th, .patti-table td {
    padding: 10px;
    border: 1px solid #f39c12;
    text-align: center;
    font-size: 0.9em;
}

.patti-table thead th {
    background-color: #f39c12;
    color: #2c3e50;
    font-weight: bold;
}

.patti-table tbody tr:nth-child(even) {
    background-color: #2c3e50;
}

.patti-table tbody tr:hover {
    background-color: #444;
}

/* Adjustments for the main content to center it */
.main-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}
