<style>
    /* Global Styles */
    body {
        font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
        background-color: #fdfbf7;
        margin: 0;
        padding-top: 60px; /* Space for fixed navbar */
        color: #333;
    }
    
    * { box-sizing: border-box; }

    /* Top Navigation Bar */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background-color: #880e4f;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    .nav-links {
        display: flex;
        gap: 30px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .nav-links li a {
        color: #fff;
        text-decoration: none;
        font-weight: bold;
        font-size: 1.1em;
        padding: 10px 15px;
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.3s;
    }
    .nav-links li a:hover, .nav-links li a.active {
        background-color: #d81b60;
    }

    /* Flyout Menus & Overlays */
    .flyout-menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 60px);
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        z-index: 900;
        overflow-y: auto;
        padding: 30px;
        display: none; /* Hidden by default */
        border-top: 2px solid #d81b60;
    }
    .flyout-menu.active {
        display: block;
    }

    .menu-title {
        text-align: center;
        color: #880e4f;
        margin-top: 0;
        margin-bottom: 25px;
        font-size: 1.5em;
        border-bottom: 2px dashed #f8bbd0;
        padding-bottom: 10px;
    }

    /* Grid for Group and Name Selection Boxes */
    .grid-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        max-width: 1000px;
        margin: auto;
    }
    .selection-box {
        background-color: #fff0f5;
        border: 2px solid #f8bbd0;
        border-radius: 8px;
        padding: 15px;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s ease-in-out;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 80px;
    }
    .selection-box:hover {
        background-color: #fce4ec;
        border-color: #d81b60;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(216, 27, 96, 0.2);
    }
    .box-number {
        font-weight: bold;
        color: #d81b60;
        font-size: 1.2em;
        margin-bottom: 5px;
    }
    .box-text {
        color: #880e4f;
        font-weight: 500;
        font-size: 1.05em;
    }

    /* Search Box Input */
    .search-input-container {
        max-width: 600px;
        margin: 0 auto 30px auto;
        display: flex;
    }
    .search-input {
        flex-grow: 1;
        padding: 15px;
        font-size: 1.1em;
        border: 2px solid #d81b60;
        border-radius: 8px;
        outline: none;
    }

    /* Main Content Area */
    .main-content {
        max-width: 900px;
        margin: 40px auto;
        padding: 0 20px;
    }

    /* Card Styles */
    .card {
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        overflow: hidden;
    }
    .card-header {
        background-color: #fce4ec; padding: 20px; border-bottom: 3px solid #d81b60;
        display: grid; grid-template-columns: auto 1fr; gap: 15px; align-items: center;
    }
    .name-number-badge {
        background-color: #d81b60; color: white; padding: 5px 12px;
        border-radius: 6px; font-weight: bold; font-size: 1em; white-space: nowrap;
    }
    .name-details { display: flex; flex-direction: column; }
    .name-sanskrit { font-size: 1.8em; color: #880e4f; font-weight: bold; margin-bottom: 4px; }
    .name-iast { font-style: normal; color: #ad1457; font-size: 1.8em; font-weight: bold; margin-bottom: 4px; }
    .name-tamil { font-weight: bold; color: #c2185b; font-size: 1.4em; }
    
    .sub-header {
        background-color: #fff0f5; padding: 12px 25px; border-bottom: 1px dashed #f8bbd0;
        color: #880e4f; font-weight: bold; font-size: 1.1em; display: flex; align-items: center;
    }
    .sub-header::before {
        content: "தமிழ் அர்த்தம்:"; font-size: 0.8em; text-transform: uppercase;
        color: #ad1457; margin-right: 10px; font-weight: normal;
        border: 1px solid #ad1457; padding: 2px 6px; border-radius: 4px; white-space: nowrap;
    }
    .summary {
        background-color: #ffece6; color: black; padding: 15px 25px;
        font-size: 1.05em; border-bottom: 1px solid #ffccbc; font-weight: 500; line-height: 1.6;
    }
    .summary::before { content: "சுருக்கம்: "; font-weight: bold; color: #d84315; }
    
    .card-body { padding: 25px; line-height: 1.8; font-size: 1.05em; background-color: #fff; color: #2c3e50; text-align: justify; }
    .card-body h3 { color: #6a1b9a; font-size: 1.2em; margin-top: 25px; border-left: 4px solid #ab47bc; padding-left: 10px; }
    .card-body h3:first-child { margin-top: 0; }
    
    .footer { background-color: #fff5e6; padding: 20px 25px; border-top: 1px solid #ffe0b2; }
    .sb-label { font-size: 0.8em; text-transform: uppercase; color: #e65100; font-weight: bold; margin-bottom: 10px; display: block; border-bottom: 1px dashed #ffb74d; padding-bottom: 5px; width: fit-content; }
    .sanskrit-verse { font-family: 'Sanskrit 2003', 'Noto Serif Devanagari', serif; font-size: 1.15em; color: #bf360c; margin-bottom: 15px; line-height: 1.6; background: rgba(255,255,255,0.7); padding: 10px; border-radius: 4px; border-left: 3px solid #ffab91; }
    .tamil-translation { font-style: italic; color: #5d4037; font-size: 0.95em; padding-left: 15px; }

    /* Navigation Buttons */
    .nav-buttons {
        display: flex;
        justify-content: space-between;
        margin-top: 30px;
        margin-bottom: 60px;
    }
    .btn {
        background-color: #880e4f;
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 8px;
        font-size: 1.1em;
        font-weight: bold;
        cursor: pointer;
        transition: background 0.3s;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    .btn:hover { background-color: #d81b60; }
    .btn:disabled { background-color: #ccc; cursor: not-allowed; box-shadow: none; }

    /* Responsive Adjustments */
    @media (max-width: 600px) {
        body { padding-top: 60px; margin: 0; }
        .main-content { margin-top: 20px; }
        .card-header { grid-template-columns: 1fr; gap: 10px; }
        .name-number-badge { width: fit-content; }
        .sub-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    }
</style>
<style>
    /* Global Styles */
    body {
        font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
        background-color: #fdfbf7;
        margin: 0;
        padding-top: 60px; /* Space for fixed navbar */
        color: #333;
    }
    
    * { box-sizing: border-box; }

    /* Top Navigation Bar */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background-color: #880e4f;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    .nav-links {
        display: flex;
        gap: 30px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .nav-links li a {
        color: #fff;
        text-decoration: none;
        font-weight: bold;
        font-size: 1.1em;
        padding: 10px 15px;
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.3s;
    }
    .nav-links li a:hover, .nav-links li a.active {
        background-color: #d81b60;
    }

    /* Flyout Menus & Overlays */
    .flyout-menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 60px);
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        z-index: 900;
        overflow-y: auto;
        padding: 30px;
        display: none; /* Hidden by default */
        border-top: 2px solid #d81b60;
    }
    .flyout-menu.active {
        display: block;
    }

    .menu-title {
        text-align: center;
        color: #880e4f;
        margin-top: 0;
        margin-bottom: 25px;
        font-size: 1.5em;
        border-bottom: 2px dashed #f8bbd0;
        padding-bottom: 10px;
    }

    /* Grid for Group and Name Selection Boxes */
    .grid-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        max-width: 1000px;
        margin: auto;
    }
    .selection-box {
        background-color: #fff0f5;
        border: 2px solid #f8bbd0;
        border-radius: 8px;
        padding: 15px;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s ease-in-out;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 80px;
    }
    .selection-box:hover {
        background-color: #fce4ec;
        border-color: #d81b60;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(216, 27, 96, 0.2);
    }
    .box-number {
        font-weight: bold;
        color: #d81b60;
        font-size: 1.2em;
        margin-bottom: 5px;
    }
    .box-text {
        color: #880e4f;
        font-weight: 500;
        font-size: 0.7em;
    }

    /* Search Box Input */
    .search-input-container {
        max-width: 600px;
        margin: 0 auto 30px auto;
        display: flex;
    }
    .search-input {
        flex-grow: 1;
        padding: 15px;
        font-size: 1.1em;
        border: 2px solid #d81b60;
        border-radius: 8px;
        outline: none;
    }

    /* Main Content Area */
    .main-content {
        max-width: 900px;
        margin: 40px auto;
        padding: 0 20px;
    }

    /* Card Styles */
    .card {
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        overflow: hidden;
    }
    .card-header {
        background-color: #fce4ec; padding: 20px; border-bottom: 3px solid #d81b60;
        display: grid; grid-template-columns: auto 1fr; gap: 15px; align-items: center;
    }
    .name-number-badge {
        background-color: #d81b60; color: white; padding: 5px 12px;
        border-radius: 6px; font-weight: bold; font-size: 1em; white-space: nowrap;
    }
    .name-details { display: flex; flex-direction: column; }
    .name-sanskrit { font-size: 1.8em; color: #880e4f; font-weight: bold; margin-bottom: 4px; }
    .name-iast { font-style: normal; color: #ad1457; font-size: 1.8em; font-weight: bold; margin-bottom: 4px; }
    .name-tamil { font-weight: bold; color: #c2185b; font-size: 1.4em; }
    
    .sub-header {
        background-color: #fff0f5; padding: 12px 25px; border-bottom: 1px dashed #f8bbd0;
        color: #880e4f; font-weight: bold; font-size: 1.1em; display: flex; align-items: center;
    }
    .sub-header::before {
        content: "தமிழ் அர்த்தம்:"; font-size: 0.8em; text-transform: uppercase;
        color: #ad1457; margin-right: 10px; font-weight: normal;
        border: 1px solid #ad1457; padding: 2px 6px; border-radius: 4px; white-space: nowrap;
    }
    .summary {
        background-color: #ffece6; color: black; padding: 15px 25px;
        font-size: 1.05em; border-bottom: 1px solid #ffccbc; font-weight: 500; line-height: 1.6;
    }
    .summary::before { content: "சுருக்கம்: "; font-weight: bold; color: #d84315; }
    
    .card-body { padding: 25px; line-height: 1.8; font-size: 1.05em; background-color: #fff; color: #2c3e50; text-align: justify; }
    .card-body h3 { color: #6a1b9a; font-size: 1.2em; margin-top: 25px; border-left: 4px solid #ab47bc; padding-left: 10px; }
    .card-body h3:first-child { margin-top: 0; }
    
    .footer { background-color: #fff5e6; padding: 20px 25px; border-top: 1px solid #ffe0b2; }
    .sb-label { font-size: 0.8em; text-transform: uppercase; color: #e65100; font-weight: bold; margin-bottom: 10px; display: block; border-bottom: 1px dashed #ffb74d; padding-bottom: 5px; width: fit-content; }
    .sanskrit-verse { font-family: 'Sanskrit 2003', 'Noto Serif Devanagari', serif; font-size: 1.15em; color: #bf360c; margin-bottom: 15px; line-height: 1.6; background: rgba(255,255,255,0.7); padding: 10px; border-radius: 4px; border-left: 3px solid #ffab91; }
    .tamil-translation { font-style: italic; color: #5d4037; font-size: 0.95em; padding-left: 15px; }

    /* Navigation Buttons */
    .nav-buttons {
        display: flex;
        justify-content: space-between;
        margin-top: 30px;
        margin-bottom: 60px;
    }
    .btn {
        background-color: #880e4f;
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 8px;
        font-size: 1.1em;
        font-weight: bold;
        cursor: pointer;
        transition: background 0.3s;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    .btn:hover { background-color: #d81b60; }
    .btn:disabled { background-color: #ccc; cursor: not-allowed; box-shadow: none; }

    /* Responsive Adjustments */
    @media (max-width: 600px) {
        body { padding-top: 60px; margin: 0; }
        .main-content { margin-top: 20px; }
        .card-header { grid-template-columns: 1fr; gap: 10px; }
        .name-number-badge { width: fit-content; }
        .sub-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    }
</style>
