/* ========================================
   INDEX PAGE STYLES
   ======================================== */


/* Top Header Styles */

.top-header {
    background-color: #252424;
    padding: 15px 35px;
    border-bottom: 2px solid #F8BB15;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-link {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-link h2 {
    font-size: 24px;
    margin: 0;
}

.header-logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.auth-button-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.auth-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
}

.login-btn {
    background-color: #F8BB15;
    color: #fff !important;
}

.login-btn:hover {
    background-color: #d9a012;
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(248, 187, 21, 0.3);
}

.logout-btn {
    background-color: #d9a012;
    color: #fff !important;
}

.logout-btn:hover {
    background-color: #d9a012;
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(248, 187, 21, 0.3);
}

.main-content {
    margin: 70px 35px;
}

.block-header {
    margin-bottom: 50px;
}


/* Featured Books Swiper Styles */

.section-title {
    color: #fff;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.featured-books-swiper {
    width: 100%;
    height: 500px;
    padding-bottom: 50px;
}

.featured-slide {
    background: #252424;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 40px;
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.featured-book-image {
    flex: 0 0 300px;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a1a;
}

.featured-book-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.featured-book-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    padding: 20px 0;
}

.featured-book-status {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 20px;
    width: fit-content;
}

.featured-book-status.new {
    background-color: #4CAF50;
    color: #fff;
}

.featured-book-status.trending {
    background-color: #FF5722;
    color: #fff;
}

.featured-book-status.popular {
    background-color: #2196F3;
    color: #fff;
}

.featured-book-status.free {
    background-color: #7A7A7A;
    color: #fff;
}

.featured-book-name {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.3;
}

.featured-book-author {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 20px;
}

.featured-book-description {
    font-size: 16px;
    color: #bbb;
    line-height: 1.6;
    margin-bottom: 30px;
    max-height: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-book-description-mobile {
    display: none;
}

.featured-book-button {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
}

.featured-book-button.btn-buy {
    background: #F8BB15;
    color: #fff;
}

.featured-book-button.btn-buy:hover {
    background: #d9a012;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 187, 21, 0.4);
}

.featured-book-button.btn-purchased {
    background: #648729;
    color: #fff;
    cursor: pointer;
}

.featured-book-button.btn-free {
    background: #7A7A7A;
    color: #fff;
    cursor: pointer;
}

.swiper-button-next,
.swiper-button-prev {
    color: #F8BB15 !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 24px;
}

.swiper-pagination-bullet {
    background: #F8BB15 !important;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}


/* Shimmer/Skeleton Loader Styles */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer-image,
.shimmer-badge,
.shimmer-title,
.shimmer-subtitle,
.shimmer-text,
.shimmer-button,
.shimmer-title-small,
.shimmer-subtitle-small,
.shimmer-price,
.shimmer-rating,
.shimmer-button-small {
    background: linear-gradient(90deg, #2a2a2a 0%, #3a3a3a 50%, #2a2a2a 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
}

.shimmer-slide {
    pointer-events: none;
}

.shimmer-image {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.shimmer-badge {
    width: 100px;
    height: 30px;
    margin-bottom: 20px;
    border-radius: 20px;
}

.shimmer-title {
    width: 80%;
    height: 40px;
    margin-bottom: 15px;
}

.shimmer-subtitle {
    width: 60%;
    height: 24px;
    margin-bottom: 20px;
}

.shimmer-text {
    width: 100%;
    height: 16px;
    margin-bottom: 12px;
}

.shimmer-text.short {
    width: 70%;
}

.shimmer-button {
    width: 150px;
    height: 50px;
    margin-top: 20px;
    border-radius: 8px;
}

.shimmer-card {
    pointer-events: none;
}

.shimmer-title-small {
    width: 90%;
    height: 24px;
    margin-bottom: 10px;
}

.shimmer-subtitle-small {
    width: 70%;
    height: 16px;
    margin-bottom: 10px;
}

.shimmer-price {
    width: 80px;
    height: 28px;
    margin-bottom: 10px;
}

.shimmer-rating {
    width: 120px;
    height: 20px;
    margin-bottom: 15px;
}

.shimmer-button-small {
    width: 100%;
    height: 40px;
}


/* Book Cards Styles */

.book-card {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.book-image {
    width: 100%;
    height: 430px;
    object-fit: fill;
    background: #252424;
}

.book-content {
    padding: 20px;
    background: #252424;
}

.book-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    min-height: 50px;
}

.book-author {
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;
}

.book-price {
    font-size: 20px;
    font-weight: 700;
    color: #F8BB15;
    margin-bottom: 0px;
}

.audio-player-container {
    margin-bottom: 15px;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 10px;
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F8BB15;
    border: none;
    color: #252424;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.audio-play-btn:hover {
    background: #d9a012;
    transform: scale(1.1);
}

.audio-play-btn.playing {
    background: #648729;
    color: #fff;
}

.audio-info {
    flex: 1;
    min-width: 0;
}

.audio-title {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-progress-container {
    position: relative;
    height: 4px;
    background: #3a3a3a;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.audio-progress-bar {
    height: 100%;
    background: #F8BB15;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-time {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}

.book-rating {
    margin-bottom: 15px;
}

.book-rating i {
    color: #ffc107;
    margin-right: 2px;
}

.book-rating .no-rating {
    color: #ccc;
    font-size: 12px;
}

.book-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-buy {
    background: #F8BB15;
    color: #fff;
}

.btn-purchased {
    background: #648729;
    color: #fff;
    cursor: pointer;
}

.btn-free {
    background: #7A7A7A;
    color: #fff;
    cursor: pointer;
}


/* ========================================
   BOOK DETAIL PAGE STYLES
   ======================================== */

.book-detail-container {
    background: #252424;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.book-detail-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.book-detail-image {
    flex: 0 0 400px;
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a1a;
}

.book-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.book-detail-info {
    flex: 1;
    color: #fff;
}

.book-detail-name {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.3;
}

.book-detail-author {
    font-size: 20px;
    color: #ccc;
    margin-bottom: 20px;
}

.book-detail-price {
    font-size: 28px;
    font-weight: 700;
    color: #F8BB15;
}

.book-detail-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.book-detail-meta-item {
    color: #bbb;
    font-size: 14px;
}

.book-detail-meta-item strong {
    color: #F8BB15;
    display: block;
    margin-bottom: 5px;
}

.book-detail-description {
    font-size: 16px;
    color: #bbb;
    line-height: 1.8;
    margin-bottom: 30px;
}

.play-all-button {
    background: #F8BB15;
    color: #252424;
    border: none;
    padding: 15px 50px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 30px 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.play-all-button:hover {
    background: #d9a012;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 187, 21, 0.4);
}

.play-all-button i {
    font-size: 20px;
}

.book-detail-shimmer {
    display: flex;
    gap: 40px;
    background: #252424;
    border-radius: 15px;
    padding: 40px;
}

.shimmer-book-image {
    flex: 0 0 400px;
    height: 600px;
    background: linear-gradient(90deg, #2a2a2a 0%, #3a3a3a 50%, #2a2a2a 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 10px;
}

.shimmer-book-info {
    flex: 1;
}

.error-message {
    text-align: center;
    color: #fff;
    padding: 50px;
    background: #252424;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.error-message i {
    display: block;
    margin: 0 auto 20px;
}

.error-message h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 24px;
}

.error-message p {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 16px;
}

.error-message a {
    display: inline-block;
    padding: 12px 30px;
    background: #F8BB15;
    color: #fff !important;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.error-message a:hover {
    background: #d9a012;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 187, 21, 0.4);
    text-decoration: none;
    color: #fff !important;
}


/* ========================================
   FOOTER STYLES
   ======================================== */

.main-footer {
    background-color: #252424;
    padding: 50px 35px 20px;
    margin-top: 60px;
    border-top: 2px solid #F8BB15;
}

.footer-section {
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

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

.footer-brand-name {
    font-size: 24px;
    font-weight: 700;
    color: #F8BB15;
    margin: 0;
}

.footer-description {
    color: #bbb;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.footer-title {
    color: #F8BB15;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #F8BB15;
}

.footer-app-download {
    text-align: center;
}

.footer-download-text {
    color: #bbb;
    font-size: 14px;
    margin-bottom: 25px;
}

.app-store-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.app-store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #3a3a3a;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    border: 1px solid #4a4a4a;
    min-width: 180px;
}

.app-store-btn:hover {
    background: #4a4a4a;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(248, 187, 21, 0.2);
    text-decoration: none;
    color: #fff;
}

.app-store-btn svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-small-text {
    font-size: 10px;
    color: #999;
    line-height: 1;
    margin-bottom: 2px;
}

.btn-large-text {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.google-play-btn:hover {
    border-color: #F8BB15;
}

.apple-store-btn:hover {
    border-color: #F8BB15;
}

.huawei-appgallery-btn:hover {
    border-color: #F8BB15;
}

.footer-bottom {
    border-top: 1px solid #3a3a3a;
    margin-top: 30px;
    padding-top: 20px;
}

.footer-copyright {
    text-align: center;
    color: #999;
    font-size: 14px;
}

.footer-copyright p {
    margin: 0;
}


/* ========================================
   RESPONSIVE STYLES
   ======================================== */

@media(max-width: 1200px) {
    .featured-book-image {
        flex: 0 0 250px;
    }
    .featured-book-name {
        font-size: 28px;
    }
}

@media(max-width: 992px) {
    .featured-slide {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    .featured-book-image {
        flex: 0 0 400px;
        width: 100%;
        max-width: 300px;
    }
    .featured-books-swiper {
        height: auto;
        min-height: 600px;
    }
    .featured-book-content {
        text-align: center;
        align-items: center;
    }
    .featured-book-description {
        max-height: none;
    }
    .main-footer {
        padding: 40px 20px 20px;
    }
    .footer-section {
        margin-bottom: 40px;
    }
    .book-detail-content {
        flex-direction: column;
    }
    .book-detail-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    .main-content {
        margin: 50px 20px;
    }
}

@media(max-width: 768px) {
    .featured-book-name {
        font-size: 24px;
    }
    .featured-book-author {
        font-size: 16px;
    }
    .featured-book-description {
        font-size: 14px;
        display: none;
        /* Hide full description on mobile */
    }
    .featured-book-description-mobile {
        display: block;
        /* Show truncated description on mobile */
        font-size: 14px;
        color: #bbb;
        line-height: 1.6;
        margin-bottom: 30px;
    }
    .featured-book-button {
        padding: 12px 30px;
        font-size: 14px;
    }
    /* Hide navigation buttons on mobile */
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
    .top-header {
        padding: 12px 20px;
    }
    .header-logo {
        height: 40px;
    }
    .auth-button {
        padding: 8px 15px;
        font-size: 14px;
    }
    .main-content {
        margin: 50px 20px;
    }
    .book-detail-container {
        padding: 25px;
    }
    .book-detail-name {
        font-size: 28px;
    }
    .book-detail-author {
        font-size: 18px;
    }
    .book-detail-price {
        font-size: 24px;
    }
    .book-detail-meta {
        flex-direction: column;
        gap: 15px;
    }
    .book-detail-image {
        max-width: 100%;
    }
    .footer-logo {
        justify-content: center;
    }
    .footer-brand-name {
        font-size: 20px;
    }
    .social-links {
        justify-content: center;
    }
    .footer-contact {
        text-align: center;
    }
}

@media(max-width:1300px) {
    .book-image {
        height: 350px;
    }
}

@media(max-width:992px) {
    .block-header {
        margin-bottom: 40px;
    }
}

@media(max-width:768px) {
    .block-header {
        margin-bottom: 30px;
    }
    .block-header .row div:first-child {
        padding: 0px !important;
    }
    #booksContainer div:first-child {
        padding: 0px !important;
    }
    .main-slogan {
        font-size: 32px !important;
        letter-spacing: 1px !important;
    }
    .footer-slogan {
        font-size: 14px !important;
    }
}

@media(max-width:580px) {
    .book-image {
        height: 500px;
    }
    .logo-link h2 {
        font-size: 16px;
    }
}