* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #121212;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 15px 0px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 25px;
    padding: 0 10px;
    width: 100%;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #0077ff;
}

header p {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Stable Grid Container with clean, readable spacing */
.hex-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 10px;
}

/* Clean, non-overlapping Hexagon styling */
.hex {
    width: 130px;
    height: 150px;
    background: linear-gradient(135deg, #e0e6ed, #cfd8dc);
    cursor: pointer;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: transform 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0;
}

/* Inner content alignment */
.hex-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
}

.hex span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333333;
    transition: color 0.3s ease;
}

/* Hover and Active Effects */
.hex:hover {
    transform: scale(1.08);
    background: linear-gradient(135deg, #0077ff, #00d2ff);
    z-index: 5;
}

.hex:hover span {
    color: #ffffff;
}

.hex:active {
    transform: scale(0.98);
}

/* Search Bar Styling */
.search-section {
    width: 100%;
    max-width: 700px;
    margin: 10px auto 0;
    padding: 0 15px;
}

.search-box {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 3;
}

#siteSearchInput {
    width: 100%;
    padding: 12px 18px;
    border-radius: 25px;
    border: 1px solid #cfd8dc;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
}

#siteSearchInput:focus {
    border-color: #0077ff;
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.15);
}

#siteSearchBtn {
    padding: 12px 22px;
    border-radius: 25px;
    border: none;
    background: linear-gradient(135deg, #0077ff, #00d2ff);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    touch-action: manipulation;
    pointer-events: auto;
    position: relative;
    z-index: 3;
}

#siteSearchBtn:hover {
    opacity: 0.88;
}

#siteSearchBtn:active {
    transform: scale(0.98);
}

.search-results {
    margin-top: 12px;
    display: none;
    flex-direction: column;
    gap: 0;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #e5eaee;
    border-radius: 12px;
    background: #ffffff;
}

.search-results.active {
    display: flex;
}

.search-result-item {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid #f0f2f4;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f4f9ff;
}

.search-result-title {
    display: block;
    font-weight: 700;
    color: #0077ff;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.search-result-snippet {
    display: block;
    font-size: 0.85rem;
    color: #555555;
    line-height: 1.4;
}

.search-result-snippet mark {
    background: #fff3b0;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

.search-status {
    padding: 12px 16px;
    color: #777777;
    font-size: 0.9rem;
}

/* Footer Styling */
footer {
    width: 100%;
    margin-top: 40px;
    padding: 25px 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(0, 119, 255, 0.05));
}

.footer-content h3 {
    font-size: 1.1rem;
    color: #e83e8c;
    margin-bottom: 8px;
    line-height: 1.5;
}

.footer-content .subheading {
    font-size: 0.95rem;
    color: #555555;
    font-weight: 500;
    margin-bottom: 15px;
    line-height: 1.4;
}

.footer-content p:not(.subheading) {
    font-size: 0.9rem;
    color: #666666;
    margin: 0 auto;
    line-height: 1.5;
}

/* ============================================
   Reusable: Shrink any table to fit small screens
   instead of forcing horizontal scroll. Pinch-zoom
   still works as long as the viewport meta tag has
   no maximum-scale. Give your table id="responsiveTable"
   to use these rules.
   ============================================ */
#responsiveTable {
    table-layout: fixed;
}
#responsiveTable td,
#responsiveTable th {
    word-break: break-word;
}
@media (max-width: 576px) {
    #responsiveTable {
        font-size: 0.50rem;
    }
    #responsiveTable td,
    #responsiveTable th {
        padding: 3px 3px !important;
    }
}