/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Anta&family=Freeman&family=Josefin+Sans:ital,wght@0,100..700;1,100..700&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    background: url('bible.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    font-family: 'Noto Sans Tamil', 'Roboto Mono', sans-serif;
    height: 100vh;
    position: relative;
}

header {
    margin: 2rem 0 0.7rem 0;
    color: white;
    font-size: 3.5rem;
    font-family: "Anta", sans-serif;
    font-weight: 500;
    font-style: normal;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.top span {
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

header h3 {
    font-family: "Josefin Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    color: rgb(201, 201, 201);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Sub-Heading - No background */
.position-relative {
    padding: 0.1rem;
    margin: 1rem;
    height: auto;
    width: auto;
    background: none !important;
    background-color: transparent !important;
}

.booknsearch {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin: 2rem 1rem 1rem 1rem;
    padding: 2rem;
    border-radius: 15px;
}

.search {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.select_book {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.start_book p,
.end_book p {
    margin: 0;
    text-align: left;
    color: rgb(44, 7, 7);
    font-size: 1.5rem;
    padding: 5.5px 25px;
    width: fit-content;
    height: auto;
    background-color: #FFB300;
    font-family: "Roboto Mono", monospace;
    font-optical-sizing: auto;
    font-weight: 900;
    font-style: normal;
    border-radius: 7px 10px 0 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.start_book select,
.end_book select {
    font-size: 1.4rem;
    padding: 10px 6px;
    width: auto;
    min-width: 200px;
    height: auto;
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #FFB300;
    border-radius: 0px 7px 9px 5px;
    box-shadow: 0px 2px 7px rgba(0, 0, 0, 0.452);
    outline: none;
    font-family: 'Noto Sans Tamil', sans-serif;
    transition: all 0.3s ease;
}

.start_book select:hover,
.end_book select:hover {
    background-color: rgba(255, 179, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.6);
}

.search_option {
    height: fit-content;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: "Josefin Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    gap: 1rem;
}

.search_option h6 {
    font-size: 1.3rem;
    text-align: center;
    font-family: "Roboto Mono", monospace;
    letter-spacing: 0.001px;
    margin: 0;
    padding: 8px 15px;
    color: white;
    background-color: #FFB300;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.search input#keyword {
    margin: 1.2rem 0;
    font-size: 1.8rem;
    color: #ffd000;
    padding: 1.2rem 1.5rem;
    width: 120%;
    background-color: rgba(41, 41, 41, 0.8);
    border: 2px solid rgba(158, 127, 47, 1);
    border-radius: 12px;
    outline: none;
    font-family: 'Noto Sans Tamil', sans-serif;

    /* Create the multi-layered gradient border effect */
    box-shadow:
        0 0 0 1px rgba(158, 127, 47, 0.75),
        0 0 0 2px rgba(158, 127, 47, 0.6),
        0 0 0 3px rgba(158, 127, 47, 0.45),
        0 0 0 4px rgba(157, 126, 47, 0.30),
        0 8px 16px rgba(0, 0, 0, 0.3);

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search input::placeholder {
    font-size: 1.5rem;
    color: rgba(254, 255, 213, 0.7);
    font-family: "Noto Sans Tamil", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

.search input:hover {
    transform: scale(1.02);
    box-shadow:
        0 0 0 1px rgba(158, 127, 47, 0.9),
        0 0 0 2px rgba(158, 127, 47, 0.8),
        0 0 0 3px rgba(158, 127, 47, 0.65),
        0 0 0 4px rgba(157, 126, 47, 0.50),
        0 12px 24px rgba(0, 0, 0, 0.4);
}

.search button {
    margin: 1rem 0.5rem;
    font-family: "Anta", sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    width: max-content;
    padding: 0.5rem 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.search button:hover {
    transform: scale(1.025);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-warning {
    background-color: #FFB300 !important;
    border-color: #FFB300 !important;
    color: rgb(44, 7, 7) !important;
}

.btn-warning:hover {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: rgb(44, 7, 7) !important;
}

.btn-secondary {
    background-color: rgba(108, 117, 125, 0.8) !important;
    border-color: rgba(108, 117, 125, 0.8) !important;
    color: white !important;
}

.btn-secondary:hover {
    background-color: rgba(90, 98, 104, 0.9) !important;
    border-color: rgba(90, 98, 104, 0.9) !important;
    color: white !important;
}

/* Custom bootstrap radio button */
.btn-group .custom-btn {
    font-family: "Freeman", sans-serif;
    font-weight: 200;
    font-style: normal;
    background-color: rgba(255, 227, 161, 0.3);
    border-color: rgb(150, 115, 0);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Change color for active (checked) button label */
.btn-group .btn-check:checked+.custom-btn {
    background-color: #ff8800;
    color: black;
    border-color: rgb(179, 137, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Remove blue border, text, and box-shadow on focus, checked, and hover */
.btn-group .custom-btn:focus,
.btn-group .custom-btn:hover,
.btn-group .btn-check:checked+.custom-btn:focus {
    border-color: rgba(110, 75, 0, 0.767);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    outline: none !important;
}

.btn-group .custom-btn:hover {
    background-color: rgba(255, 198, 40, 0.7);
    color: white !important;
    transform: translateY(-2px);
}

/* Results and Filter Styling */
.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    margin: 1rem auto 2rem auto;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

#results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
}

#results.hidden {
    display: none;
}

/* Custom scrollbar styling */
#results::-webkit-scrollbar,
.container::-webkit-scrollbar {
    width: 8px;
}

#results::-webkit-scrollbar-track,
.container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

#results::-webkit-scrollbar-thumb,
.container::-webkit-scrollbar-thumb {
    background: #FFB300;
    border-radius: 4px;
}

#results::-webkit-scrollbar-thumb:hover,
.container::-webkit-scrollbar-thumb:hover {
    background: #ffc107;
}

main {
    min-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-bottom: 2rem;
}

#results-filter {
    display: none;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.95);
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

#results-filter label {
    color: #8B4513;
    font-weight: bold;
    text-shadow: none;
}

#results-filter select {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #FFB300;
    border-radius: 4px;
    padding: 8px;
    font-family: 'Noto Sans Tamil', sans-serif;
}

#results-filter button {
    background-color: #FFB300;
    color: rgb(44, 7, 7);
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#results-filter button:hover {
    background-color: #ffc107;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.result-list {
    font-family: 'Noto Sans Tamil', sans-serif;
}

.result-item {
    border-left: 4px solid #FFB300;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px;
    gap: 10px;
}

.result-content {
    flex: 1;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #FFB300;
    opacity: 0.7;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: rgba(255, 179, 0, 0.1);
    border-radius: 4px;
}

.copy-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.result-item strong {
    color: #ff8800;
}

.pagination button {
    background-color: #FFB300 !important;
    color: rgb(44, 7, 7) !important;
    font-family: 'Noto Sans Tamil', sans-serif !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
}

.pagination button:hover {
    background-color: #ffc107 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.pagination button:disabled {
    background-color: rgba(108, 117, 125, 0.6) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    transform: none !important;
    cursor: not-allowed !important;
}

/* Media Queries for Responsiveness */
@media (min-width: 1025px) {
    .booknsearch {
        margin-top: 2rem;
    }
}

@media (min-width: 600px) and (max-width: 1024px) {
    .booknsearch {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .search {
        margin-top: 2rem;
        width: 80%;
    }

    .btn-group .custom-btn {
        font-size: 1.1rem;
        padding: 0.5rem 0.4rem;
    }

    header {
        font-size: 3rem;
    }

    .top span {
        font-size: 3rem;
    }

    header h3 {
        font-size: 1.7rem;
    }

    .start_book p,
    .end_book p,
    .start_book select,
    .end_book select {
        font-size: 1.4rem;
    }
}

@media (max-width: 600px) {
    #search-icon {
        display: none;
    }

    .booknsearch {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 1rem;
        padding: 1rem;
        gap: 1.5rem;
    }

    .select_book {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
    }

    .start_book,
    .end_book {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
    }

    .start_book select,
    .end_book select {
        min-width: 100%;
        font-size: 1.1rem;
    }

    .search {
        margin-top: 1rem;
        width: 100%;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .custom-btn {
        font-size: 1.1rem;
        padding: 0.5rem 0.4rem;
        width: 100%;
    }

    header {
        font-size: 1.8rem;
        margin: 1rem 0 0.5rem 0;
    }

    .top {
        gap: 0.5rem;
    }

    .top span {
        font-size: 1.8rem;
    }

    header h3 {
        font-size: 1.3rem;
    }

    .start_book p,
    .end_book p {
        font-size: 1.2rem;
        text-align: center;
        width: 100%;
    }

    .search input#keyword {
        padding: 1rem 0.5rem;
        font-size: 1.2rem;
    }

    .search input::placeholder {
        font-size: 1.05rem;
    }

    .search button {
        font-size: 1.4rem;
        width: 100%;
        margin: 0.5rem 0;
    }

    .search_option {
        width: 100%;
    }

    .search_option h6 {
        width: 100%;
        text-align: center;
    }
}

/* Additional styling for compatibility with existing script */
.highlight {
    background: linear-gradient(120deg, #ffd000 0%, #FFB300 100%);
    color: rgb(44, 7, 7);
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Ensure no white space at bottom */
body::after {
    content: '';
    display: block;
    height: 0;
}

#results:not(:empty) {
    display: block !important;
    visibility: visible !important;
}