/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-logo {
    width: 250px;
    height: 250px;
    object-fit: contain;
    animation: fadeInOut 2s ease-in-out infinite;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e5;
    border-top: 3px solid #f87171;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Copyright Notice Strip */
.copyright-strip {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

.copyright-strip.hidden {
    transform: translateY(-100%);
}

.copyright-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.copyright-content p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copyright-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1); /* Makes the icon white */
    flex-shrink: 0;
}

.copyright-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.copyright-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.copyright-close:active {
    transform: scale(0.95);
}

/* Adjust body padding when copyright strip is visible */
body {
    padding-top: 0;
    transition: padding-top 0.3s ease-in-out;
}

body.copyright-visible {
    padding-top: 52px; /* Adjust based on strip height */
}

/* Header Styles */
.header {
    background-color: #f5f5f0;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 10px 0;
    background-color: rgba(245, 245, 240, 0.95);
    backdrop-filter: blur(10px);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link.active,
.nav-link:hover {
    background-color: #8B4513;
    color: white;
}

.logo-img {
    height: 60px;
    width: auto;
}

.medium-btn {
    height: 35px;
    width: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.medium-btn:hover {
    transform: scale(1.05);
}

/* Profile Section */
.profile-section {
    padding: 40px 0;
    background-color: #f5f5f0;
    border-bottom: 1px solid #e0e0e0;
}

.profile-content {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 15px;
}

.profile-image {
    flex-shrink: 0;
}

.profile-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-text p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.social-link:hover img {
    transform: scale(1.1);
}

/* Telegram Section */
.telegram-section {
    padding: 40px 0;
    background-color: #f9f9f4;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* Telegram Button */
.telegram-button-container {
    display: flex;
    justify-content: center;
}

.telegram-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(45deg, #0088cc, #00aaff);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
    border: 2px solid transparent;
}

.telegram-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    background: linear-gradient(45deg, #006699, #0088cc);
}

.telegram-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 136, 204, 0.3);
}

.telegram-btn img {
    flex-shrink: 0;
    filter: brightness(0) invert(1); /* Makes black icon white */
    transition: all 0.3s ease;
}

/* Carousel Section */
.carousel-section {
    margin: 40px 0;
    padding: 0 20px;
}

.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    background-color: #d0d0d0;
    border-radius: 10px;
    overflow: hidden;
    height: 300px;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.carousel-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.carousel-link:hover img {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background: white;
}

/* Section Titles */
.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}

/* E-books Section */
.ebooks-section {
    padding: 40px 0;
    background-color: white;
}

.book-card {
    display: flex;
    gap: 30px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.book-image img {
    width: 150px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* COMING SOON BADGE STYLES - Easy to remove by commenting out this section */
.book-image {
    position: relative;
}

.coming-soon-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    transform: rotate(10deg);
    z-index: 10;
    border: 2px solid white;
}
/* END COMING SOON BADGE STYLES */

.book-details {
    flex: 1;
}

.book-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.book-genre {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.book-synopsis h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.book-synopsis p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.available-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 15px;
}

.platform-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.platform-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.platform-btn.amazon {
    background-color: #FF9900;
    color: white;
}

.platform-btn.goodreads {
    background-color: #8B4513;
    color: white;
}

.platform-btn.other {
    background-color: #FFB6C1;
    color: #8B4513;
}

.platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.platform-btn img {
    width: 16px;
    height: 16px;
}

/* Web novels Section */
.webnovels-section {
    padding: 40px 0;
    background-color: #f5f5f0;
}

.novels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.novel-card {
    display: flex;
    gap: 20px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.novel-image img {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.novel-details {
    flex: 1;
}

.novel-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.novel-genre {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.novel-synopsis h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.novel-synopsis p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 15px;
}

.read-btn {
    display: inline-block;
    background-color: #FF6B35;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.read-btn:hover {
    background-color: #E55A2B;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: #8B4513;
    position: relative;
    padding: 40px 0;
    text-align: center;
    overflow: hidden;
}

.footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.1;
}

.footer-info {
    position: relative;
    z-index: 2;
    color: white;
}

.footer-info p {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-signature {
    font-weight: 600;
    font-size: 16px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #8B4513;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #A0522D;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
}

.back-to-top span {
    font-weight: bold;
    line-height: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .copyright-content {
        padding: 0 15px;
        flex-direction: row;
        gap: 15px;
    }
    
    .copyright-content p {
        font-size: 13px;
    }
    
    .copyright-close {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
    
    body.copyright-visible {
        padding-top: 48px;
    }
    
    .nav {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .nav-links {
        order: 2;
        gap: 20px;
    }
    
    .logo {
        order: 1;
    }
    
    .support-btn {
        order: 3;
    }
    
    .header.scrolled {
        padding: 8px 0;
    }
    
    .header.scrolled .nav {
        gap: 15px;
    }
    
    .profile-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .profile-image img {
        width: 100px;
        height: 100px;
    }
    
    .carousel-container {
        height: 200px;
        margin: 0 10px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .book-card {
        flex-direction: column;
        text-align: center;
    }
    
    .book-image img {
        width: 120px;
        height: 160px;
        margin: 0 auto;
    }
    
    .platform-buttons {
        justify-content: center;
    }
    
    .novels-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .novel-card {
        flex-direction: column;
        text-align: center;
    }
    
    .novel-image img {
        width: 80px;
        height: 110px;
        margin: 0 auto;
    }
    
    .section-title {
        font-size: 20px;
        text-align: center;
    }
    
    .footer-info p {
        font-size: 12px;
    }
    
    .footer-signature {
        font-size: 14px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }
    
    .telegram-section {
        padding: 30px 0;
    }
    
    .telegram-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .copyright-content {
        gap: 10px;
    }
    
    .copyright-content p {
        font-size: 12px;
    }
    
    .copyright-close {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    body.copyright-visible {
        padding-top: 44px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .social-links {
        justify-content: center;
        gap: 12px;
    }
    
    .telegram-btn {
        padding: 8px 16px;
        font-size: 12px;
        gap: 6px;
    }
    
    .telegram-btn img {
        width: 16px;
        height: 16px;
    }
    
    .carousel-container {
        height: 150px;
    }
    
    .platform-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .platform-btn img {
        width: 14px;
        height: 14px;
    }
    
    .novel-card {
        padding: 15px;
        gap: 15px;
    }
    
    .book-card {
        padding: 15px;
    }
    
    .telegram-section {
        padding: 25px 0;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Accessibility */
.carousel-btn:focus,
.nav-link:focus,
.social-link:focus,
.platform-btn:focus,
.read-btn:focus,
.back-to-top:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}
