/* Base Responsive Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-image: url(https://images.pexels.com/photos/129731/pexels-photo-129731.jpeg?auto=compress&cs=tinysrgb&w=600);
    background-size: cover;
    background-attachment: fixed;
}

img, iframe {
    max-width: 100%;
    height: auto;
}

/* Common Responsive Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background: rgba(0,0,0,0.2);
    flex-wrap: wrap;
    gap: 15px;
}

.top-header h1 {
    color: #00ffcc;
    text-shadow: 0 0 10px #00ffcc;
    margin: 0;
    font-size: clamp(1.2rem, 5vw, 2.2rem);
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.header-logo {
    height: 50px;
    width: auto;
}

/* Responsive Navigation */
#sec {
    background-color: white;
    color: #169976;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

#nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 0 20px;
}

#nav a {
    color: #007b5e;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    transition: color 0.3s;
    border-bottom: 2px solid transparent;
}

#nav a:hover, #nav a.active {
    color: #00ffcc;
    border-bottom: 2px solid #00ffcc;
}

/* Home Page Specifics */
.book1, .book2 {
    display: flex;
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    overflow: hidden;
}

.page {
    flex: 1;
    padding: 30px;
    min-width: 300px;
}

.page-left {
    border-right: 1px solid #eee;
}

.passage {
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Footer Responsiveness */
#foot {
    background: linear-gradient(to right, #0f2027, #2c5364);
    color: #e2e8f0;
    padding: 40px 20px;
    border-top: 5px solid #00ffcc;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.6);
    padding: 25px;
    border-radius: 15px;
}

/* View Counter Styles */
.view-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto 0 !important;
    padding: 8px 15px;
    background: rgba(0, 255, 204, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 204, 0.4);
    color: #00ffcc;
    font-family: 'Inter', sans-serif;
    width: fit-content;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
}

/* Media Queries */
@media (max-width: 768px) {
    .top-header {
        padding: 15px 20px;
        justify-content: center;
    }

    .header-logo {
        height: 40px;
    }

    .book1, .book2 {
        flex-direction: column;
        width: 95%;
    }

    .page {
        border-right: none;
        padding: 20px;
    }

    .page-left {
        border-bottom: 1px solid #eee;
    }

    #nav {
        gap: 10px 15px;
    }

    h1 {
        font-size: 28px;
    }

    .passage {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .top-header h1 {
        order: -1;
        width: 100%;
        margin-bottom: 10px;
    }

    #nav {
        flex-direction: column;
        align-items: center;
    }

    #nav a {
        width: 100%;
        text-align: center;
        padding: 5px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    #nav a:last-child {
        border-bottom: none;
    }
}

.view-icon {
    font-size: 1.2rem;
}

.view-text {
    font-weight: 600;
    font-size: 1rem;
}

#view-count {
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px #00ffcc;
    font-size: 1.1rem;
}
