@import url('https://fonts.googleapis.com/css2?family=Mukta+Malar:wght@200;300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Round');

/* Scoped variables if supported, or just verify support. CSS variables in :root are global. 
   Ideally prefix them, but for V1.0 let's keep it simple. */
:root {
    --primary-blue: #1a237e;
    --primary-red: #d32f2f;
    --primary-green: #2e7d32;
    --border-yellow: #fbc02d;
    --bg-yellow-light: #fffde7;
    --text-brown: #5d4037;
    --font-main: 'Mukta Malar', sans-serif;
    --table-header-bg: #e1f5fe;
    --border-grey: #e0e0e0;
}

/* Replaced body with specific container scope */
.dc2026-container {
    font-family: var(--font-main);
    background-color: #f5f5f5;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
    /* Ensure padding doesn't break width */
}

/* Ensure all child elements use border-box if needed, or specific reset */
.dc2026-container * {
    box-sizing: border-box;
}

/* Navigation Styles */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn {
    text-decoration: none;
    color: #333;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.dc2026-container input[type="date"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

/* Calendar Sheet Styles */
.calendar-sheet {
    background: white;
    border: 1px solid #ccc;
    padding: 15px;
    padding-top: 40px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    position: relative;
    border-top: none;
    margin-bottom: 30px;
}

/* Spiral Binding Effect */
.calendar-sheet::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 10px;
    right: 10px;
    height: 45px;
    background-image:
        radial-gradient(circle at center, #3e2723 6px, transparent 7px),
        linear-gradient(to right, transparent 50%, #cfd8dc 55%, #b0bec5 60%, #cfd8dc 65%, transparent 70%);
    background-size: 40px 45px;
    background-repeat: repeat-x;
    background-position: center;
    z-index: 10;
}

/* Header Date Section */
.header-date {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
    margin-top: 20px;
}

.header-num {
    font-size: 130px;
    color: var(--primary-blue);
    text-shadow:
        2px 2px 0px #fff,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
    -webkit-text-stroke: 1px var(--border-yellow);
    position: relative;
    line-height: 1em;
}

@media (min-width: 600px) {
    .header-num {
        font-size: 180px;
    }
}

.header-dash {
    font-size: 100px;
    color: var(--primary-red);
    font-weight: 900;
    margin-top: -20px;
    line-height: 0;
}

/* Greeting Line */
.greeting-line {
    text-align: center;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 5px 0 20px 0;
    padding: 5px;
    border-top: 1px dashed #eee;
    border-bottom: 1px dashed #eee;
}

/* Layout Wrapper */
.layout-wrapper {
    display: block;
    border: 3px solid var(--border-yellow);
}

/* Top Data Strip */
.top-row-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    border-bottom: 2px solid var(--border-yellow);
}

.top-cell {
    padding: 10px;
    text-align: center;
    border-right: 2px solid var(--border-yellow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.top-cell:last-child {
    border-right: none;
}

.tamil-month-label {
    color: #c2185b;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.tamil-date-big {
    font-size: 5rem;
    color: var(--primary-red);
    font-weight: 800;
    line-height: 1;
}

.english-month-label {
    background-color: #fce4ec;
    color: #880e4f;
    font-weight: 800;
    font-size: 1.4rem;
    border-radius: 4px;
    margin-bottom: 5px;
    display: inline-block;
    padding: 2px 15px;
}

.day-name-big {
    font-size: 2.2rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-top: 5px;
}

/* Info Paragraph */
.info-paragraph {
    padding: 15px;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    text-align: justify;
    border-bottom: 2px solid var(--border-yellow);
    background-color: #fafafa;
}

/* Times Section */
.times-section {
    width: 100%;
}

.times-table {
    width: 100%;
    border-collapse: collapse;
}

.times-table td {
    border: 1px solid var(--border-yellow);
    padding: 8px 12px;
    font-size: 0.95rem;
    vertical-align: top;
}

.label-brown {
    color: var(--text-brown);
    font-weight: 800;
    width: 140px;
}

.label-red {
    color: #b71c1c;
    font-weight: 700;
}

.value-text {
    font-weight: 600;
    color: #000;
}

.footer-row {
    color: #bf360c;
    font-weight: 700;
    background: var(--bg-yellow-light);
}


/* --- Detailed Data Table Styles --- */
.details-table-container {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.details-header {
    background-color: var(--table-header-bg);
    padding: 15px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0d47a1;
    border-bottom: 2px solid #81d4fa;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table tr {
    border-bottom: 1px solid var(--border-grey);
}

.details-table tr:last-child {
    border-bottom: none;
}

.details-table td {
    padding: 12px 15px;
    vertical-align: top;
}

.label-col {
    background-color: #fafafa;
    width: 35%;
    border-right: 1px solid var(--border-grey);
}

.value-col {
    width: 65%;
    color: #333;
    font-weight: 500;
}

.lbl-tamil {
    font-size: 1.05rem;
    font-weight: 600;
    color: #424242;
    margin-bottom: 2px;
}

.lbl-eng {
    font-size: 0.9rem;
    color: #757575;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {

    /* .container replaced to .dc2026-container */
    .dc2026-container {
        padding: 5px;
    }

    .header-num {
        font-size: 20vw;
    }

    .header-dash {
        font-size: 40px;
        margin-top: -5px;
    }

    .top-row-grid {
        grid-template-columns: 1fr;
    }

    .top-cell {
        border-right: none;
        border-bottom: 2px solid var(--border-yellow);
    }

    .top-cell:last-child {
        border-bottom: none;
    }

    .times-table td {
        display: block;
        border-bottom: none;
    }

    .times-table tr {
        border-bottom: 1px solid var(--border-yellow);
    }

    .label-brown {
        width: auto;
        display: block;
        margin-bottom: 2px;
    }

    .times-grid-mobile {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    /* Details Table Mobile adjustments */
    .details-table td {
        padding: 10px;
    }

    .lbl-tamil {
        font-size: 1rem;
    }

    .label-col {
        width: 40%;
    }

    .value-col {
        width: 60%;
    }
}