/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
}

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

h2, h3 {
    text-align: center;
    color: #D4A76A;
}

h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

h3 {
    font-size: 22px;
    margin: 20px 0;
}

/* Form Styles */
.form {
    text-align: center;
    margin-bottom: 20px;
	 margin-left: 30px;
}

.form label {
    font-weight: bold;
    margin-right: 10px;
    color: #D4A76A;
}

.form select, .form input[type="submit"] {
    padding: 8px;
    margin: 5px;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 14px;
    background-color: #222;
    color: #D4A76A;
}

.form input[type="submit"] {
    background-color: #8B4513;
    color: #D4A76A;
    border: none;
    cursor: pointer;
}

.form input[type="submit"]:hover {
    background-color: #A0522D;
}

/* Notification and UTC Note */
.utc-note, .notification {
    color: #ff6b6b;
    text-align: center;
    margin: 10px 0;
    font-size: 14px;
}

/* Center and style Daily Panchang table */
.daily-panchang {
  text-align: center;
}
.daily-panchang table {
  margin: 0 auto;
  border-collapse: collapse;
}
.daily-panchang th,
.daily-panchang td {
  border: 1px solid #ccc;
  padding: 8px;
}


/* Daily Panchang Table */
.daily-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #FFF5CC;
    border: 1px solid #8B4513;
}

.daily-table tr {
    display: flex;
    flex-wrap: wrap;
}

.daily-table td {
    border: 1px solid #8B4513;
    padding: 15px;
    text-align: left;
    vertical-align: top;
    font-size: 17px; /* Increased by 3 points */
    width: 50%;
    box-sizing: border-box;
    color: #000; /* Changed to black */
}

.daily-table .sub-heading {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #8B4513;
}

.daily-table .column {
    display: block;
}

.daily-table .column p {
    margin: 8px 0;
}

.daily-table .column p strong {
    color: #8B4513;
}

/* Daily Boxes */
.daily-boxes {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.daily-box {
    padding: 15px;
    border: 1px solid #8B4513;
    flex: 1;
    min-width: 200px;
    font-size: 14px;
    background-color: #FFF5CC;
    color: #000; /* Changed to black */
}

.daily-box h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #8B4513;
    border-bottom: 1px solid #8B4513;
    padding-bottom: 5px;
}

.daily-box.red { background-color: #ffebee; }
.daily-box.blue { background-color: #e3f2fd; }
.daily-box.green { background-color: #e8f5e9; }
.daily-box.yellow { background-color: #fffde7; }

/* Summary Box */
.summary-box {
    border: 2px solid #8B4513;
    background-color: #FFF5CC;
    padding: 15px;
    margin: 20px auto;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.3);
}

.summary {
    font-style: italic;
    font-size: 14px;
    margin: 0;
    color: #000;
}

/* North Indian Chart */
.north-indian-chart {
    max-width: 500px;
    background: #FFF5CC;
    border: 2px solid #8B4513;
    display: block;
    margin: 20px auto;
}

/* Monthly Calendar Section */
.monthly-section {
    margin: 20px 0;
    clear: both;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.monthly-title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    color: #D4A76A;
    margin-bottom: 10px;
}

.monthly-subtitle {
    font-size: 18px;
    text-align: center;
    color: #D4A76A;
    margin-bottom: 20px;
}

.moon-phase-section {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.moon-phase-img {
    width: 80px;
    height: auto;
    margin-right: 20px;
}

.moon-phase-details p {
    margin: 5px 0;
    font-size: 14px;
    color: #D4A76A;
}

/* Calendar Grid */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #8B4513;
    border: 2px solid #8B4513;
    width: 100%;
    box-sizing: border-box;
}

.calendar .header {
    background-color: #D4A76A;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #000;
    border-bottom: 1px solid #8B4513;
}

.calendar .date-box {
    background-color: #FFF5CC;
    min-height: 180px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.calendar .date-box.festival {
    background-color: #E6F4EA; /* Light green for festival days */
}

.calendar .date-box.current-date {
    border: 2px solid #8B4513;
}

.calendar .top-wrapper {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 5px;
}

.calendar .solar-icon {
    width: 20px;
    height: 20px;
}

.calendar .solar-icon img {
    width: 100%;
    height: auto;
}

.calendar .solar-times {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #000;
    margin-bottom: 8px;
}

.calendar .sunrise-time {
    text-align: left;
    flex: 1;
}

.calendar .sunset-time {
    text-align: right;
    flex: 1;
}

.calendar .moonphase {
    display: flex;
    justify-content: center;
    margin: 5px 0;
}

.calendar .moonphase img {
    width: 50px;
    height: 50px;
}

.calendar .date-wrapper {
    display: flex;
    justify-content: center;
    margin: 5px 0;
}

.calendar .date {
    font-size: 24px;
    font-weight: bold;
    color: #8B4513;
    line-height: 1;
    text-align: center;
}

.calendar .date-box.current-date .date {
    color: #F57C00; /* Rustic orange for current date */
}

/* Add this new rule */
.calendar .date-box.festival .date {
    font-size: 24px !important;
    color: #8B4513 !important;
}

.calendar .content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-grow: 1;
    font-size: 10px;
    gap: 2px;
}

.calendar .tithi, 
.calendar .nakshatra, 
.calendar .yoga, 
.calendar .karana {
    margin: 1px 0;
    color: #000;
    display: flex;
    align-items: center;
    gap: 3px;
}

.calendar .symbol-icon {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

.calendar .festival {
    font-weight: bold;
    color: #2E7D32;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 5px;
}

.calendar .festival span {
    display: block;
    font-size: 9px;
}

.calendar .empty {
    background-color: #E6F4EA; /* Changed to light green/grey */
    border: 1px solid #8B4513;
    min-height: 180px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 20px;
    }

    .form select, .form input[type="submit"] {
        width: 100%;
        margin: 5px 0;
    }

    .daily-table td {
        width: 100%;
        display: block;
        font-size: 16px; /* Adjusted for mobile */
    }

    .daily-table .sub-heading {
        font-size: 28px;
    }

    .daily-boxes {
        flex-direction: column;
        gap: 10px;
    }

    .daily-box {
        flex: none;
        width: 100%;
    }

    .summary-box {
        padding: 10px;
    }

    .monthly-title {
        font-size: 24px;
    }

    .monthly-subtitle {
        font-size: 16px;
    }

    .moon-phase-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .moon-phase-img {
        margin-bottom: 10px;
    }

    .calendar .date {
        font-size: 20px;
    }

    .calendar .content-wrapper {
        min-height: 120px;
    }

    .calendar .empty {
        min-height: 150px;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    .daily-table td {
        font-size: 15px; /* Adjusted for small mobile */
    }

    .daily-table .sub-heading {
        font-size: 26px;
    }

    .calendar .date {
        font-size: 18px;
    }

    .calendar .content-wrapper {
        min-height: 100px;
    }

    .calendar .empty {
        min-height: 130px;
    }
}

/* Center the moon-phase image + details */
.moon-phase-section {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1em auto;
  width: auto;
}
.moon-phase-img {
  width: 48px;
  height: auto;
  margin-right: 1em;
}
.moon-phase-details {
  flex: 0 0 auto;
  text-align: left;
}


/* Center page title */
h1 {
    text-align: center;
    margin: 1em 0;
}

/* Center date selector block */
.date-selector {
    display: inline-block;
    text-align: center;
    margin: 0.5em auto 1em;
    width: auto;
}

/* Style and center form elements within date-selector */
.date-selector form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
}

.date-selector label,
.date-selector select,
.date-selector button {
    margin: 0.25em;
    padding: 0.25em 0.5em;
    font-size: 1em;
}
