/* --- START OF FILE style.css --- */ :root { --primary-color: #5a2e98; --primary-color-darker: #6b3aa7; --secondary-color: #f0f0f0; --text-color-dark: #333; --text-color-light: #fff; --background-light: #f0f0f0; --background-dark: #222; --box-shadow-color: rgba(0, 0, 0, 0.1); --border-color: #ccc; --font-family-primary: 'Times New Roman', serif; --font-family-secondary: 'Arial', sans-serif;a --gold-color: gold; --error-color: #ff4d4d; --link-color: #5a2e98; --link-hover-color: #333; --star-color-inactive: #ccc; --star-color-active: #ffc107; --login-bg-start: #ee7752; --login-bg-mid1: #e73c7e; --login-bg-mid2: #23a6d5; --login-bg-end: #23d5ab; --login-form-bg: rgba(0, 0, 0, 0.85); /* Slightly less transparent for readability */ --login-form-hover-shadow: 0 10px 20px rgba(0,0,0,0.4); --login-form-shadow: 0 5px 15px rgba(0,0,0,0.3); --login-input-bg: rgba(255, 255, 255, 0.15); --login-input-focus-bg: rgba(255, 255, 255, 0.25); --login-button-bg: #6200EE; --login-button-hover-bg: #7c4dff; --popup-bg-light: rgba(255, 255, 255, 0.95); --popup-bg-dark: rgba(40, 40, 40, 0.95); --nav-height-desktop: 10rem; /* Approximate */ --nav-height-mobile: 7rem; /* Approximate */ } /* --- Global Styles & Resets --- */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { scroll-behavior: smooth; } body { margin: 0; font-family: var(--font-family-secondary); /* Use secondary as default, override where needed */ background: linear-gradient(-45deg, var(--login-bg-start), var(--login-bg-mid1), var(--login-bg-mid2), var(--login-bg-end)); background-size: 400% 400%; animation: gradientAnimation 15s ease infinite; color: var(--text-color-light); position: relative; transition: background-color 0.5s ease, color 0.5s ease; overflow-x: hidden; /* Prevent horizontal scroll */ display: flex; /* Added for centering container */ justify-content: center; /* Added for centering container */ min-height: 100vh; } body::before { content: ''; position: fixed; /* Changed to fixed */ top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); /* Dim overlay */ z-index: -2; /* Behind content and nav */ } @keyframes gradientAnimation { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .container { width: 90%; max-width: 1200px; margin-left: auto; margin-right: auto; position: relative; z-index: 1; } img { max-width: 100%; height: auto; display: block; } a { color: var(--link-color); text-decoration: none; } a:hover { color: var(--link-hover-color); text-decoration: underline; } button { cursor: pointer; font-family: inherit; } ul { list-style: none; } h1, h2, h3 { font-family: var(--font-family-primary); color: var(--text-color-light); /* Default white for headings */ text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4); } h2 { font-size: 1.8rem; margin-bottom: 1.5rem; text-align: center; } h3 { font-size: 1.2rem; margin-bottom: 0.75rem; } /* Visually Hidden Utility */ .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } /* --- Dark Mode --- */ body.dark-mode { background: var(--background-dark); color: var(--text-color-light); } body.dark-mode::before { background-color: rgba(0, 0, 0, 0.7); /* Darker overlay */ } body.dark-mode #main-nav { background: rgba(0, 0, 0, 0.2); box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1); } body.dark-mode #main-nav.scrolling { background: linear-gradient(135deg, rgb(28 15 48 / 87%), #000000); box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2); } body.dark-mode #main-nav:hover { background: linear-gradient(135deg, rgba(17, 82, 106, 0.8), rgba(107, 58, 167, 0.8)); } body.dark-mode #main-nav.scrolling:hover { background: linear-gradient(135deg, rgba(17, 82, 106, 1), rgba(107, 58, 167, 1)); } body.dark-mode #main-nav .submenu { background-color: rgba(20, 20, 20, 0.9); /* Darker submenu */ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); } body.dark-mode #search-box { background-color: rgba(255, 255, 255, 0.15); color: var(--text-color-light); border: 1px solid rgba(255, 255, 255, 0.2); } body.dark-mode #search-box:focus, body.dark-mode #search-box:hover { background-color: rgba(255, 255, 255, 0.2); box-shadow: 0 0 0 2px var(--primary-color); } body.dark-mode #search-button i.fas.fa-search { color: var(--text-color-light); } body.dark-mode #search-suggestions { background-color: #333; color: var(--text-color-light); } body.dark-mode #search-suggestions li { color: var(--text-color-light); } body.dark-mode #search-suggestions li:hover { background-color: #444; } body.dark-mode #search-suggestions .no-results { color: #aaa; } body.dark-mode .book, body.dark-mode .carousel-item { background-color: rgba(255, 255, 255, 0.05); /* Subtle background */ border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 2px 5px rgba(255, 255, 255, 0.05); color: var(--text-color-light); } body.dark-mode .book h3, body.dark-mode .carousel-item h3 { color: var(--text-color-light); text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7); } body.dark-mode .book p, body.dark-mode .carousel-item p { color: rgba(255, 255, 255, 0.8); /* Slightly dimmer text */ } body.dark-mode .book .book-publication-date { color: rgba(255, 255, 255, 0.7); } body.dark-mode .pagination button { background-color: #444; color: var(--text-color-light); border-color: #666; } body.dark-mode .pagination button:hover:not(:disabled) { background-color: var(--primary-color-darker); } body.dark-mode .pagination button:disabled { background-color: #555; color: #999; } body.dark-mode .form-container { background: rgba(0, 0, 0, 0.8); /* Dark form background */ } body.dark-mode .book-details-content { background-color: rgba(255, 255, 255, 0.08); color: var(--text-color-light); border: 1px solid rgba(255, 255, 255, 0.15); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); } body.dark-mode .book-details-content h2, body.dark-mode .book-details-content h3 { color: var(--primary-color); /* Keep primary color for contrast */ text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7); } body.dark-mode .book-details-content p { color: rgba(255, 255, 255, 0.9); } body.dark-mode #book-details-comment-box { background-color: rgba(0, 0, 0, 0.3); color: var(--text-color-light); border-color: rgba(255, 255, 255, 0.2); } body.dark-mode #book-details-publication-date.book-publication-date { color: rgba(255, 255, 255, 0.7); } body.dark-mode #close-book-details-button { color: #ccc; } body.dark-mode #close-book-details-button:hover { color: #fff; } body.dark-mode .book-info p .info-value, body.dark-mode #book-details-description .info-value { color: rgba(255, 255, 255, 0.8); } body.dark-mode #payment-popup .payment-instructions p { color: rgba(255, 255, 255, 0.8); } body.dark-mode #payment-popup .account-info p { color: rgba(255, 255, 255, 0.8); } body.dark-mode .tertiary-button { color: #bb86fc; /* Material Design purple */ } body.dark-mode .tertiary-button:hover { color: #d1a9ff; } body.dark-mode .favorite-button.active i { color: #cf6679; /* Material Design error color */ } body.dark-mode .site-footer { background: rgba(0, 0, 0, 0.15); box-shadow: 0 -2px 5px rgba(255, 255, 255, 0.05); /* Top shadow */ } body.dark-mode #newsletter-form input { color: white; background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); } body.dark-mode .footer-bottom a { color: #bb86fc; /* Consistent link color */ } body.dark-mode .footer-bottom a:hover { color: #d1a9ff; } body.dark-mode #payment-popup, body.dark-mode #ve-chung-toi-popup, body.dark-mode #newsletter-notification-popup { background: var(--popup-bg-dark); color: var(--text-color-light); } body.dark-mode #ve-chung-toi-popup { background-color: rgba(30, 30, 30, 0.97); /* More specific dark bg for letter */ color: #eee; border-color: #555; } body.dark-mode #ve-chung-toi-popup h2 { color: var(--gold-color); /* Gold title in dark mode */ } body.dark-mode #ve-chung-toi-popup #close-ve-chung-toi-popup { color: #aaa; } body.dark-mode #ve-chung-toi-popup #close-ve-chung-toi-popup:hover { color: #eee; } body.dark-mode #payment-popup .account-info .account-number, body.dark-mode #newsletter-notification-popup a { color: var(--gold-color); /* Keep gold consistent */ } body.dark-mode #payment-popup-close-icon, body.dark-mode #close-newsletter-popup-icon { color: #bbb; } body.dark-mode #payment-popup-close-icon:hover, body.dark-mode #close-newsletter-popup-icon:hover { color: #fff; } body.dark-mode #starfield-sky { display: block; /* Show stars only in dark mode */ } /* --- Header (Desktop - kept minimal as nav takes over) --- */ .site-header { display: none; /* Effectively hidden by the fixed nav */ } /* --- Main Navigation --- */ #main-nav { background: linear-gradient(135deg, #11526a, #6b3aa7f0); color: var(--text-color-light); padding: 0; border-radius: 0; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; /* Keep flex for the container */ /* align-items: stretch; Let container handle height */ justify-content: center; /* Center the nav-container */ height: auto; /* Adjust height based on content */ width: 100%; /* Full width initially */ transition: background 0.5s ease-in-out, box-shadow 0.5s ease-in-out; } #main-nav .logo { border-radius: 50%; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: all 0.3s ease; } #main-nav .logo:hover { transform: scale(1.05) translateY(-2px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); border-color: rgba(255, 255, 255, 0.4); } /* This container centers the content on desktop */ #main-nav .nav-container { width: 90%; max-width: 1200px; /* margin-right: auto; */ display: flex; flex-grow: 1; justify-content: space-evenly; align-items: center; } #main-nav:hover { background: linear-gradient(135deg, var(--primary-color-darker), #50288a); } .nav-section-left { display: flex; align-items: center; padding-left: 20px; /* Desktop padding */ } .nav-section-left .logo { max-width: 120px; /* Adjusted size */ height: auto; transition: transform 0.3s ease; } .nav-section-left .logo:hover { transform: scale(1.05); } .nav-section-right { display: flex; flex-direction: column; align-items: flex-end; /* Align content to the right */ padding-right: 20px; /* Desktop padding */ justify-content: center; /* Vertically center content rows */ } .nav-sub-flow-top, .nav-sub-flow-middle, .nav-sub-flow-bottom { display: flex; align-items: center; width: 100%; /* Ensure full width within right section */ justify-content: flex-end; /* Default to right align */ padding: 5px 0; } .nav-sub-flow-top { justify-content: center; /* Center the title */ } .nav-sub-flow-middle { border-top: 1px solid rgba(255, 255, 255, 0.15); border-bottom: 1px solid rgba(255, 255, 255, 0.15); padding-top: 8px; padding-bottom: 8px; justify-content: center; /* Center the menu */ } .nav-sub-flow-bottom { padding-top: 8px; } .nav-sub-flow-top .site-title { font-size: 2.3em; /* Desktop title size */ color: var(--text-color-light); text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4); font-family: var(--font-family-primary); white-space: nowrap; margin: 0; text-align: center; } .nav-sub-flow-top .site-title:hover { transform: none; /* No hover effect needed */ } #main-nav .menu { display: flex; align-items: center; justify-content: center; /* Center menu items */ flex-wrap: wrap; /* Allow wrapping on potentially smaller desktops */ gap: 5px 15px; /* Row and column gap */ } #main-nav .menu > li { position: relative; display: flex; /* Ensure flex alignment */ align-items: center; } #main-nav .menu > li > a { color: var(--text-color-light); text-decoration: none; padding: 8px 12px; /* Slightly smaller padding */ border-radius: 5px; transition: color 0.3s ease, background-color 0.3s ease, transform 0.2s ease; display: flex; align-items: center; gap: 8px; font-family: var(--font-family-secondary); position: relative; overflow: hidden; white-space: nowrap; font-size: 0.95rem; /* Slightly smaller font */ } #main-nav .menu > li > a::before { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background-color: var(--secondary-color); transform: scaleX(0); transform-origin: center; /* Animate from center */ transition: transform 0.3s ease; } #main-nav .menu > li > a:hover::before, #main-nav .menu > li > a.active::before { transform: scaleX(1); } #main-nav .menu > li > a:hover, #main-nav .menu > li > a.active { color: var(--secondary-color); background-color: rgba(255, 255, 255, 0.1); transform: translateY(-1px); /* Subtle lift */ } #main-nav .menu > li > a i { font-size: 0.9em; /* Slightly smaller icons */ } #main-nav .submenu { display: none; /* Use visibility/opacity for transitions */ visibility: hidden; opacity: 0; position: absolute; top: 100%; left: 50%; /* Center below parent */ transform: translateX(-50%) translateY(5px); /* Adjust position */ background-color: rgba(91, 46, 152, 0.95); /* Use primary color with opacity */ border-radius: 5px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); z-index: 101; overflow: hidden; transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease; min-width: 180px; /* Minimum width */ } #main-nav .has-submenu .submenu { display: block; /* Luôn là block để tính toán vị trí, nhưng ẩn bằng cách khác */ visibility: hidden; opacity: 0; position: absolute; top: 100%; left: 50%; /* Center below parent */ transform: translateX(-50%) translateY(10px); /* Start slightly lower */ background-color: rgba(91, 46, 152, 0.95); /* Use primary color with opacity */ border-radius: 5px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); z-index: 101; overflow: hidden; transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease; min-width: 180px; /* Minimum width */ pointer-events: none; /* Ẩn khỏi tương tác chuột khi không active */ } /* Khi thẻ li.has-submenu có class 'submenu-active' HOẶC khi hover trên desktop */ #main-nav .has-submenu.submenu-active .submenu, #main-nav .has-submenu:hover .submenu { /* Vẫn giữ hover cho desktop */ visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); /* Final position */ pointer-events: auto; /* Cho phép tương tác chuột khi active */ } /* --- CSS CHO DARK MODE (điều chỉnh nếu cần) --- */ body.dark-mode #main-nav .has-submenu .submenu { background-color: rgba(20, 20, 20, 0.9); /* Darker submenu */ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); } /* Các style khác của .submenu a, .submenu li giữ nguyên */ #main-nav .submenu li { width: 100%; } #main-nav .submenu a { padding: 10px 15px; display: block; font-family: var(--font-family-secondary); color: var(--text-color-light); transition: background-color 0.2s ease, color 0.2s ease; white-space: nowrap; font-size: 0.9rem; } #main-nav .submenu a i { margin-right: 8px; font-size: 0.9em; width: 1.2em; /* Ensure alignment */ text-align: center; } #main-nav .submenu a:hover { background-color: rgba(255, 255, 255, 0.15); color: var(--secondary-color); } #main-nav .has-submenu:hover .submenu { display: block; /* Keep display block for layout */ visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); /* Final position */ } #main-nav .submenu li { width: 100%; } #main-nav .submenu a { padding: 10px 15px; display: block; font-family: var(--font-family-secondary); color: var(--text-color-light); transition: background-color 0.2s ease, color 0.2s ease; white-space: nowrap; font-size: 0.9rem; } #main-nav .submenu a i { margin-right: 8px; font-size: 0.9em; width: 1.2em; /* Ensure alignment */ text-align: center; } #main-nav .submenu a:hover { background-color: rgba(255, 255, 255, 0.15); color: var(--secondary-color); } .right-nav { display: flex; align-items: center; gap: 15px; } /* User Info / Van Xu */ #user-info.interactive-van-xu { display: inline-flex; /* Use inline-flex */ align-items: center; gap: 10px; /* Consistent gap */ padding: 6px 12px; border-radius: 20px; /* Pill shape */ background-color: rgba(0, 0, 0, 0.1); font-family: var(--font-family-secondary); color: var(--text-color-light); font-size: 0.9rem; /* Slightly smaller */ cursor: pointer; transition: all 0.3s ease; border: 1px solid rgba(255, 255, 255, 0.1); } #user-info.interactive-van-xu:hover { background-color: rgba(255, 255, 255, 0.1); transform: scale(1.03); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); border-color: rgba(255, 255, 255, 0.3); } #user-info.interactive-van-xu:active { transform: scale(0.99); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); } #user-rank, #user-van-xu { display: inline-flex; /* Align icon and text */ align-items: center; gap: 5px; } #user-info.interactive-van-xu i { font-size: 1em; /* Match text size */ opacity: 0.9; } #user-rank i.fa-shield-alt { color: var(--secondary-color); } #user-van-xu i.fa-coins { color: var(--gold-color); } #user-van-xu .van-xu-value { font-weight: bold; color: var(--gold-color); } /* Rank Colors */ #user-rank.rank-hoc-gia-to-mo .rank-text { color: #ccc; } #user-rank.rank-thu-sinh .rank-text { color: #90EE90; } /* LightGreen */ #user-rank.rank-thu-si .rank-text { color: #ADD8E6; } /* LightBlue */ #user-rank.rank-thu-quan .rank-text { color: #E6E6FA; } /* Lavender */ #user-rank.rank-thu-thanh .rank-text { color: gold; } .rank-up-effect { animation: rankUpAnimation 1s ease-in-out; } @keyframes rankUpAnimation { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } } /* Search Box */ .search-container { position: relative; } #search-box { padding: 8px 35px 8px 15px; border-radius: 20px; /* Pill shape */ border: 1px solid rgba(255, 255, 255, 0.3); font-size: 0.9rem; background-color: rgba(255, 255, 255, 0.1); color: var(--text-color-light); transition: all 0.3s ease; width: 180px; /* Default width */ } #search-box:focus { outline: none; background-color: rgba(255, 255, 255, 0.2); box-shadow: 0 0 0 2px var(--primary-color-darker); width: 220px; /* Expand on focus */ } #search-box:hover { background-color: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.5); } #search-box::placeholder { color: rgba(255, 255, 255, 0.7); } #search-button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1em; color: rgba(255, 255, 255, 0.8); opacity: 0.8; transition: opacity 0.3s ease, color 0.3s ease; } #search-button:hover { opacity: 1; color: #fff; } #search-suggestions { position: absolute; top: calc(100% + 5px); /* Position below search */ left: 0; right: 0; background-color: var(--secondary-color); border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); display: none; /* Hidden by default */ z-index: 102; padding: 0.5rem 0; list-style: none; margin: 0; max-height: 200px; /* Limit height */ overflow-y: auto; } #search-suggestions li { padding: 0.6rem 1rem; cursor: pointer; transition: background-color 0.2s ease; color: var(--text-color-dark); text-align: left; font-size: 0.9rem; } #search-suggestions li:hover { background-color: rgba(0, 0, 0, 0.1); } #search-suggestions .no-results { padding: 0.6rem 1rem; color: #777; font-style: italic; cursor: default; } /* Theme Toggle */ .theme-toggle button { background: none; border: none; color: var(--text-color-light); font-size: 1.2em; cursor: pointer; transition: color 0.3s ease, transform 0.3s ease, opacity 0.3s ease; padding: 8px; border-radius: 50%; opacity: 0.9; display: flex; /* Center icon */ align-items: center; justify-content: center; } .theme-toggle button:hover { color: var(--secondary-color); transform: scale(1.1) rotate(15deg); opacity: 1; } .theme-toggle button i { transition: transform 0.5s ease-in-out; } /* Login/Logout Buttons */ .login-menu { position: relative; } #login-button, #logout-button { background: none; border: 1px solid var(--secondary-color); color: var(--text-color-light); font-size: 0.9rem; cursor: pointer; padding: 7px 15px; /* Adjusted padding */ border-radius: 20px; transition: all 0.3s ease; display: flex; align-items: center; gap: 6px; } #login-button:hover, #logout-button:hover { background-color: var(--secondary-color); color: var(--primary-color); border-color: var(--secondary-color); transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } #user-dropdown { display: none; /* Handled by JS */ } #user-dropdown button { /* Logout inherits styles, no specific dropdown style needed yet */ } /* --- Main Content Area --- */ .main-content { padding-top: var(--nav-height-desktop); /* Space below fixed nav */ position: relative; /* Needed for loading overlay */ } /* Loading Overlay */ .loading-overlay { position: fixed; /* Cover viewport */ top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center; z-index: 999; /* High z-index */ opacity: 0; transition: opacity 0.3s ease; pointer-events: none; } .loading-overlay.active { opacity: 1; pointer-events: auto; } .loading-spinner { border: 4px solid #f3f3f3; border-top: 4px solid var(--primary-color); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* Content Sections */ .content-section { display: none; /* Hidden by default */ opacity: 0; transform: translateY(20px); transition: opacity 0.4s ease, transform 0.4s ease; margin-bottom: 2.5rem; /* Spacing between sections */ padding: 0 10px; /* Add some horizontal padding */ } .content-section.active { display: block; opacity: 1; transform: translateY(0); } /* --- Trang Chủ Specific --- */ #trang-chu .social-icons .icon { /* == KÍCH THƯỚC ICON TRANG CHỦ (DESKTOP) == */ width: 60px; /* << THAY ĐỔI chiều rộng vòng tròn DESKTOP */ height: 60px; /* << THAY ĐỔI chiều cao vòng tròn DESKTOP */ font-size: 30px; } /* Social Icons (shared) */ .social-icons { display: flex; justify-content: center; /* Center on page */ gap: 20px; /* Spacing */ margin-bottom: 2rem; /* Space below icons */ margin-top: 1rem; /* Space above icons */ } .icon { width: 50px; /* Slightly smaller */ height: 50px; border-radius: 50%; transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); display: flex; justify-content: center; align-items: center; text-decoration: none; font-size: 24px; /* Adjusted size */ color: white; box-shadow: 0 8px 15px rgba(0,0,0,0.15), 0 4px 4px rgba(0,0,0,0.1); } .icon:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 12px 25px rgba(0,0,0,0.2), 0 8px 8px rgba(0,0,0,0.15); } .icon:active { transform: translateY(-1px) scale(0.98); box-shadow: 0 4px 8px rgba(0,0,0,0.15), 0 2px 2px rgba(0,0,0,0.1); } .icon-facebook { background: #1877f2; } .icon-tiktok { background: #000; } .icon-youtube { background: #ff0000; } .icon-facebook:hover { background: #166fe5; } .icon-tiktok:hover { background: #333; } .icon-youtube:hover { background: #cc0000; } /* New Books Carousel */ #new-books { margin-bottom: 2.5rem; } .new-books-carousel { position: relative; overflow: hidden; width: 100%; max-width: 800px; /* Adjust max width as needed */ margin: 1rem auto; /* Centering */ border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); } .new-books-inner { display: flex; transition: transform 0.5s ease; } .new-book-item { flex: 0 0 100%; /* Each item takes full width */ position: relative; aspect-ratio: 16 / 7; /* Adjust aspect ratio for desired height */ cursor: pointer; overflow: hidden; /* Clip image */ } .new-book-item img { width: 100%; height: 100%; object-fit: cover; /* Cover the area */ transition: transform 0.4s ease; } .new-book-item:hover img { transform: scale(1.05); /* Slight zoom on hover */ } .new-book-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0)); /* Gradient overlay */ color: white; padding: 1.5rem 1rem 1rem; /* More padding */ text-shadow: 1px 1px 3px rgba(0,0,0,0.6); } .new-book-overlay h3 { margin: 0; font-size: 1.6em; font-family: var(--font-family-primary); color: #fff; /* Ensure white */ } .new-book-overlay p { margin: 0.3rem 0 0; font-size: 0.9em; font-family: var(--font-family-secondary); color: rgba(255, 255, 255, 0.9); } /* Featured Books Carousel */ #featured-books { margin-bottom: 2.5rem; } .carousel { display: flex; overflow-x: auto; overflow-y: hidden; /* Hide vertical scrollbar */ gap: 1rem; /* Space between items */ padding: 1rem 0.5rem 1.5rem; /* Top, sides, bottom padding */ scroll-behavior: smooth; scroll-snap-type: x mandatory; /* Snap scrolling */ -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */ } /* Add subtle scrollbar styling */ .carousel::-webkit-scrollbar { height: 8px; } .carousel::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1); border-radius: 4px; } .carousel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 4px; } body.dark-mode .carousel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); } .carousel-item { flex: 0 0 220px; /* Fixed width for carousel items */ scroll-snap-align: start; /* Snap alignment */ border-radius: 8px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; background-color: var(--background-light); /* Light bg for items */ color: var(--text-color-dark); /* Dark text */ overflow: hidden; /* Ensure content fits */ display: flex; /* Use flex for structure */ flex-direction: column; } .carousel-item:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); } /* --- Book Display (All Books & Categories) --- */ .book-container { display: grid; /* Use grid for responsive layout */ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Responsive columns */ gap: 1.5rem; /* Gap between books */ margin-bottom: 2rem; } .book, .carousel-item { /* Shared styles for book cards */ background-color: var(--background-light); border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 2px 5px var(--box-shadow-color); text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; display: flex; flex-direction: column; overflow: hidden; /* Prevent content overflow */ color: var(--text-color-dark); padding: 0.8rem; /* Internal padding */ justify-content: space-between; /* Distribute space */ min-height: 420px; /* Minimum height for consistency */ } .book:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); } .book-image { width: 100%; aspect-ratio: 2 / 3; /* Maintain aspect ratio */ object-fit: cover; border-radius: 4px; margin-bottom: 0.8rem; } .book-title-container { min-height: 3.2em; /* Allow space for two lines */ margin-bottom: 0.5rem; display: flex; /* Center text vertically */ align-items: center; justify-content: center; } .book h3 { /* Includes carousel item h3 */ font-family: var(--font-family-primary); font-size: 1.1em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; /* Limit to 2 lines */ -webkit-box-orient: vertical; margin: 0; /* Remove default margin */ color: var(--text-color-dark); /* Ensure dark text */ text-shadow: none; /* No shadow on light bg */ } .book-publication-date { font-size: 0.8em; color: #666; /* Grey color for date */ font-family: var(--font-family-secondary); margin-bottom: 0.5rem; } .ratings { display: flex; justify-content: center; align-items: center; margin-bottom: 0.8rem; gap: 2px; } .ratings .star { color: var(--star-color-inactive); font-size: 1em; /* Adjust size */ cursor: pointer; transition: color 0.2s ease, transform 0.2s ease; } .ratings .star:hover { transform: scale(1.2); } .ratings .star.active, .ratings .star.half { /* Style half stars same as active */ color: var(--star-color-active); } .ratings .star.half i::before { /* Use Font Awesome's half-star icon */ content: "\f5c0"; /* Unicode for fa-star-half-alt */ font-family: "Font Awesome 5 Free"; font-weight: 900; } .button-group { display: flex; flex-direction: column; gap: 0.5rem; /* Space between rows */ margin-top: auto; /* Push buttons to bottom */ } .button-row { display: flex; justify-content: space-around; /* Space out buttons */ align-items: center; gap: 0.5rem; } /* Specific Button Styles within Book Cards */ .book .purchase-button, .book .read-button { flex-grow: 1; /* Allow buttons to grow */ padding: 0.5rem 0.8rem; border: none; border-radius: 5px; font-size: 0.85em; font-weight: bold; transition: all 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.1); } .book .purchase-button { background-color: var(--primary-color); color: white; } .book .read-button { background-color: #9b59b6; /* Different color for read */ color: white; } .book .purchase-button:hover { background-color: var(--primary-color-darker); box-shadow: 0 2px 4px rgba(0,0,0,0.2); transform: translateY(-1px); } .book .read-button:hover { background-color: #8e44ad; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transform: translateY(-1px); } .book .add-to-cart-button, .book .favorite-button { background: none; border: none; font-size: 1.3em; /* Icon size */ color: #aaa; /* Default icon color */ cursor: pointer; transition: color 0.2s ease, transform 0.2s ease; padding: 5px; /* Add padding for easier clicking */ line-height: 1; /* Prevent extra space */ display: flex; align-items: center; justify-content: center; } .book .add-to-cart-button:hover { color: var(--primary-color); /* Color on hover */ transform: scale(1.1); } .book .favorite-button:hover { color: #e74c3c; /* Red hover for favorite */ transform: scale(1.1); } .book .favorite-button.active { color: #e74c3c; /* Red when active */ } .book .favorite-button.active:hover { color: #c0392b; /* Darker red */ } /* --- Category Section --- */ #the-loai h2 { /* Category Title */ margin-bottom: 1rem; } .category-section { display: none; /* Hidden by default */ margin-bottom: 2.5rem; } .category-section.active { display: block; } .category-section h3 { /* Sub-category Titles */ font-size: 1.5rem; text-align: center; margin-bottom: 1.5rem; color: var(--primary-color); /* Use primary color */ text-shadow: 1px 1px 1px rgba(0,0,0,0.2); } body.dark-mode .category-section h3 { color: var(--gold-color); /* Gold in dark mode */ text-shadow: 1px 1px 2px rgba(0,0,0,0.5); } /* --- Pagination --- */ .pagination { display: flex; justify-content: center; align-items: center; margin-top: 2rem; /* Space above pagination */ flex-wrap: wrap; /* Allow wrapping */ gap: 0.5rem; /* Space between buttons */ } .pagination button { padding: 0.5rem 0.9rem; margin: 0; /* Remove margin, use gap */ border: 1px solid var(--border-color); border-radius: 4px; background-color: var(--secondary-color); color: var(--text-color-dark); cursor: pointer; transition: all 0.2s ease; font-size: 0.9rem; } .pagination button:hover:not(:disabled) { background-color: var(--primary-color); color: var(--text-color-light); border-color: var(--primary-color); transform: translateY(-1px); } .pagination button:disabled { background-color: #e0e0e0; color: #999; cursor: default; border-color: #ccc; } .pagination button.active { /* Style for current page (if needed, JS adds class) */ background-color: var(--primary-color); color: var(--text-color-light); font-weight: bold; border-color: var(--primary-color-darker); cursor: default; } /* --- Auth Forms (Login/Register) --- */ .auth-section { display: none; justify-content: center; align-items: center; min-height: calc(100vh - var(--nav-height-desktop)); /* Fill space below nav */ padding: 2rem 1rem; } .auth-section.active { display: flex; } .form-container { background: var(--login-form-bg); padding: 2.5rem; border-radius: 12px; text-align: center; box-shadow: var(--login-form-shadow); width: 100%; /* Full width on mobile, max on desktop */ max-width: 400px; position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease; color: var(--text-color-light); } .form-container:hover { transform: translateY(-5px); box-shadow: var(--login-form-hover-shadow); } .form-title { font-size: 1.8em; margin-bottom: 0.8rem; font-weight: 600; color: #fff; } .form-subtitle { font-size: 1em; margin-bottom: 2rem; color: rgba(255, 255, 255, 0.8); } .input-group { position: relative; margin-bottom: 1.8rem; } .form-input { width: 100%; padding: 1rem; /* Slightly more padding */ border: none; border-radius: 6px; background-color: var(--login-input-bg); color: var(--text-color-light); font-size: 1em; outline: none; transition: all 0.3s ease; border: 1px solid transparent; /* Placeholder for error border */ } .form-input:focus { background-color: var(--login-input-focus-bg); box-shadow: 0 0 0 2px rgba(98, 0, 238, 0.4); border-color: rgba(98, 0, 238, 0.4); } .form-input::placeholder { color: rgba(255, 255, 255, 0.6); } .input-label { /* Floating label effect */ position: absolute; left: 1rem; top: 1rem; color: rgba(255, 255, 255, 0.7); pointer-events: none; transition: all 0.2s ease; background-color: var(--login-form-bg); /* Match background */ padding: 0 0.3rem; /* Padding for background */ } .form-input:focus + .input-label, .form-input:not(:placeholder-shown) + .input-label { top: -0.6rem; /* Move label up */ font-size: 0.8em; color: var(--text-color-light); } .error-message { display: none; color: var(--error-color); font-size: 0.85em; margin-top: 0.4rem; text-align: left; } .input-group.error .form-input { border: 1px solid var(--error-color); } .input-group.error .error-message { display: block; } .password-input-group { position: relative; } .password-toggle-button { position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: rgba(255, 255, 255, 0.7); font-size: 1.1em; cursor: pointer; padding: 0; transition: color 0.3s ease; } .password-toggle-button:hover { color: var(--text-color-light); } .remember-me-container { display: flex; align-items: center; justify-content: flex-start; /* Align left */ margin-bottom: 1rem; margin-top: -0.8rem; /* Pull up slightly */ } .remember-me-container input[type="checkbox"] { margin-right: 0.5rem; width: 16px; height: 16px; } .remember-me-container label { font-size: 0.9em; color: rgba(255, 255, 255, 0.8); user-select: none; } .interactive-button, .sign-in-button { /* Shared button style */ display: block; /* Full width */ width: 100%; padding: 0.9rem 1.5rem; border: none; border-radius: 6px; background-color: var(--login-button-bg); color: var(--text-color-light); font-size: 1.05em; font-weight: bold; cursor: pointer; transition: all 0.3s ease; outline: none; margin-top: 1rem; /* Space above button */ } .interactive-button:hover, .sign-in-button:hover { background-color: var(--login-button-hover-bg); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(98, 0, 238, 0.3); } .interactive-button:active, .sign-in-button:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(98, 0, 238, 0.2); } .forgot-password-container { margin-top: 1rem; text-align: right; /* Align right */ } .forgot-password-link { color: rgba(255, 255, 255, 0.7); font-size: 0.9em; text-decoration: none; transition: color 0.3s ease; } .forgot-password-link:hover { color: var(--text-color-light); text-decoration: underline; } .or-continue { margin: 1.5rem 0; color: rgba(255, 255, 255, 0.7); font-size: 0.9em; text-align: center; position: relative; text-transform: uppercase; } .or-continue::before, .or-continue::after { content: ''; position: absolute; top: 50%; width: 35%; /* Adjust width of lines */ height: 1px; background-color: rgba(255, 255, 255, 0.3); } .or-continue::before { left: 0; } .or-continue::after { right: 0; } .social-buttons { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; } .social-button { background-color: rgba(255, 255, 255, 0.1); color: var(--text-color-light); width: 45px; /* Slightly larger */ height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.2em; border: none; cursor: pointer; transition: all 0.3s ease; } .social-button:hover { background-color: rgba(255, 255, 255, 0.2); transform: scale(1.1); } .form-footer { font-size: 0.95em; color: rgba(255, 255, 255, 0.8); text-align: center; margin-top: 1.5rem; } .sign-up-link { color: var(--text-color-light); text-decoration: none; font-weight: bold; border-bottom: 1px solid transparent; transition: border-color 0.3s ease, color 0.3s ease; } .sign-up-link:hover { color: var(--secondary-color); border-color: var(--secondary-color); } /* --- Yêu Thích Section --- */ #yeu-thich-container { /* Uses .book-container styles */ } #empty-favorites { display: none; /* Hidden by default, shown by JS */ text-align: center; margin-top: 2rem; font-style: italic; color: rgba(255, 255, 255, 0.8); font-size: 1.1rem; } /* --- Lịch Sử Mua Hàng Section --- */ #lich-su-mua-hang table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; background-color: rgba(0, 0, 0, 0.1); /* Subtle background */ border-radius: 8px; overflow: hidden; /* Clip rounded corners */ box-shadow: 0 2px 5px rgba(0,0,0,0.2); } #lich-su-mua-hang th, #lich-su-mua-hang td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.15); } #lich-su-mua-hang th { background-color: rgba(255, 255, 255, 0.1); font-weight: bold; font-family: var(--font-family-secondary); font-size: 0.95rem; color: rgba(255, 255, 255, 0.9); } #lich-su-mua-hang td { font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); } #lich-su-mua-hang tr:last-child td { border-bottom: none; } #lich-su-mua-hang tr:hover { background-color: rgba(255, 255, 255, 0.05); } #empty-purchase-history { display: none; /* Hidden by default, shown by JS */ text-align: center; margin-top: 2rem; font-style: italic; color: rgba(255, 255, 255, 0.8); font-size: 1.1rem; } /* --- Liên Hệ Section --- */ #lien-he { text-align: center; padding: 1rem; background-color: rgba(0, 0, 0, 0.1); border-radius: 8px; } #lien-he p { margin-bottom: 0.8rem; font-size: 1.1rem; line-height: 1.6; color: rgba(255, 255, 255, 0.9); } #lien-he a { color: var(--gold-color); font-weight: bold; } #lien-he a:hover { color: #ffeb3b; /* Lighter gold */ } /* --- Book Details Section --- */ #book-details { padding: 2rem; /* Add some vertical padding */ } .book-details-content { display: flex; gap: 2rem; /* Increased gap */ background-color: var(--background-light); padding: 2rem; /* More padding */ border-radius: 10px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); color: var(--text-color-dark); /* Dark text on light bg */ position: relative; /* For close button positioning */ } #close-book-details-button { position: absolute; top: 0.8rem; right: 0.8rem; background: none; border: none; font-size: 1.8rem; /* Larger icon */ color: #aaa; cursor: pointer; opacity: 0.8; transition: all 0.2s ease; padding: 5px; /* Easier click target */ line-height: 1; } #close-book-details-button:hover { opacity: 1; color: #555; transform: scale(1.1); } .book-cover { flex: 0 0 250px; /* Fixed width for cover */ text-align: center; } .book-cover img { max-width: 100%; border-radius: 6px; box-shadow: 0 4px 8px rgba(0,0,0,0.2); margin-bottom: 1rem; /* Space below image */ } #book-details-rating { justify-content: center; /* Center stars */ margin-bottom: 0.5rem; } #book-details-publication-date { font-size: 0.9em; color: #555; } .book-info { flex: 1; /* Take remaining space */ display: flex; flex-direction: column; } .book-info h2 { font-size: 2em; /* Larger title */ margin-bottom: 0.5rem; color: var(--primary-color); text-shadow: none; } .book-info p { margin-bottom: 0.8rem; line-height: 1.6; font-size: 1rem; color: #444; /* Darker paragraph text */ } .book-info p .info-value { /* Style for the actual data */ color: #333; font-weight: 500; } #book-details-description { margin-top: 1rem; /* Space above description */ } #book-details-description .info-value { font-family: 'Roboto', sans-serif; display: block; /* Make description value block */ margin-top: 0.3rem; font-style: italic; color: #555; } .book-actions { display: flex; flex-wrap: wrap; /* Allow wrapping */ gap: 0.8rem; /* Space between actions */ margin-top: 1rem; /* Space above actions */ margin-bottom: 1.5rem; align-items: center; /* Align items vertically */ } /* Shared button styles for details page */ .book-actions button { padding: 0.7rem 1.2rem; border-radius: 6px; font-size: 0.95rem; font-weight: bold; border: none; transition: all 0.2s ease; display: inline-flex; /* Align icon and text */ align-items: center; gap: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .book-actions button:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); } .book-actions button:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.1); } .book-actions .primary-button { /* Thỉnh thư */ background-color: var(--primary-color); color: white; } .book-actions .secondary-button { /* Đọc thử */ background-color: #9b59b6; color: white; } .book-actions .tertiary-button { /* Add to Cart, Favorite */ background: none; color: #888; /* Default icon color */ font-size: 1.6em; /* Larger icons */ padding: 5px; /* Click area */ box-shadow: none; } .book-actions .tertiary-button:hover { transform: scale(1.1); box-shadow: none; } .book-actions .add-to-cart:hover { color: var(--primary-color); } .book-actions .favorite-button span { display: none; /* Hide "Yêu thích" text, rely on icon */ } .book-actions .favorite-button:hover { color: #e74c3c; } .book-actions .favorite-button.active { color: #e74c3c; } .book-actions .favorite-button.active:hover { color: #c0392b; } .book-actions .favorite-button.active i { /* Pulse animation */ animation: pulse 0.6s ease; } @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } } .comments-section { margin-top: 1.5rem; border-top: 1px solid #eee; /* Separator */ padding-top: 1.5rem; } .comments-section h3 { font-size: 1.3em; margin-bottom: 1rem; color: #555; text-shadow: none; } #book-details-comments { margin-bottom: 1rem; max-height: 200px; /* Limit comment height */ overflow-y: auto; padding-right: 10px; /* Space for scrollbar */ } #book-details-comments p { /* Individual comment style */ background-color: rgba(255, 255, 255, 0.05); padding: 0.8rem; margin-bottom: 0.8rem; border-radius: 4px; border: 1px solid #eee; font-size: 0.95rem; line-height: 1.5; } #book-details-comment-box { width: 100%; padding: 0.8rem; margin-bottom: 0.8rem; border: 1px solid var(--border-color); border-radius: 5px; resize: vertical; min-height: 80px; font-size: 1rem; color: #333; background-color: #fff; } #book-details-comment-submit { background-color: var(--primary-color); color: white; padding: 0.6rem 1.2rem; border-radius: 5px; font-size: 0.95rem; font-weight: bold; border: none; transition: all 0.2s ease; } #book-details-comment-submit:hover { background-color: var(--primary-color-darker); box-shadow: 0 2px 4px rgba(0,0,0,0.2); } /* --- Footer --- */ .site-footer { border-radius: 1rem 1rem 0 0; /* Rounded top corners */ background: linear-gradient(145deg, rgba(17, 82, 106, 0.9), rgba(91, 46, 152, 0.9)); color: #eee; padding: 2rem 1rem 1.5rem; /* Increased top padding, consistent side/bottom */ font-family: var(--font-family-secondary); margin-top: 1rem; /* Space above footer */ box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2); /* Add a subtle top shadow */ } .footer-container { display: flex; justify-content: space-between; /* Keep space between */ max-width: 1200px; margin: 0 auto; flex-wrap: wrap; /* Allow wrapping on smaller desktops */ gap: 2rem 1.5rem; /* Increased row and column gap */ } .footer-section { flex: 1; /* Allow sections to grow/shrink */ min-width: 220px; /* Minimum width before wrapping */ padding: 0 1rem; /* Add horizontal padding within sections */ display: flex; /* Use flex for vertical alignment */ flex-direction: column; /* Stack content vertically */ } .footer-title { font-size: 1.15rem; /* Slightly larger title */ margin-bottom: 1.2rem; /* More space below title */ color: var(--gold-color); font-weight: bold; text-transform: uppercase; letter-spacing: 1px; display: flex; /* Align icon and text */ align-items: center; gap: 0.6rem; /* Space between icon and text */ /* text-align: center; /* Optional: Center titles */ } .footer-title i { /* Style title icons */ font-size: 1.1em; opacity: 0.9; } .footer-section p { font-size: 0.9rem; line-height: 1.6; color: rgba(255, 255, 255, 0.85); /* Slightly brighter text */ margin-bottom: 0.8rem; overflow-wrap: break-word; /* Ensure long text wraps */ } .footer-section ul { padding: 0; margin: 0; list-style: none; /* Ensure list style is none */ } .footer-section ul li { margin-bottom: 0.7rem; /* More space between list items */ } .footer-section ul li a { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: 0.95rem; /* Slightly larger links */ transition: color 0.2s ease; display: inline-flex; align-items: center; gap: 8px; } .footer-section ul li a:hover { color: #fff; } .footer-section ul li a i { opacity: 0.8; width: 1.2em; /* Help align icons */ text-align: center; } /* Footer Social Icons */ .footer-section .social-icons { justify-content: flex-start; /* Align left by default */ margin-top: 0.5rem; margin-bottom: 0; gap: 10px; /* Adjust gap */ } /* Center social icons if section is centered (optional) */ /* .footer-section.center-align .social-icons { justify-content: center; } */ .footer-section .social-icons .icon { width: 58px; /* Slightly larger icons */ height: 58px; font-size: 35px; box-shadow: 0 4px 8px rgba(0,0,0,0.15); /* Adjust shadow */ } .footer-section .social-icons .icon:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 6px 12px rgba(0,0,0,0.2); } .xem-them-link { /* "Xem thêm" link */ color: var(--gold-color); font-weight: bold; cursor: pointer; border-bottom: 1px solid transparent; /* Add underline on hover */ transition: color 0.2s ease, border-color 0.2s ease; } .xem-them-link:hover { color: #ffeb3b; border-color: #ffeb3b; } /* Newsletter Section Specifics */ .newsletter-text { font-size: 0.9rem; margin-bottom: 0.8rem; color: rgba(255, 255, 255, 0.85); } #newsletter-form { display: flex; gap: 8px; margin-top: 0.5rem; align-items: center; /* Align input and button vertically */ flex-wrap: wrap; /* Allow wrap on smaller widths */ } #newsletter-form input { flex: 1 1 180px; /* Allow input to grow but have a base size */ padding: 0.7rem; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 5px; font-size: 0.9rem; background-color: rgba(255, 255, 255, 0.1); color: #fff; min-width: 150px; /* Prevent input becoming too small */ } #newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.6); } #newsletter-form button { padding: 0.4rem 1rem; background-color: var(--primary-color); color: white; border: none; cursor: pointer; border-radius: 5px; display: inline-flex; align-items: center; gap: 6px; /* Increased gap */ font-size: 0.9rem; font-weight: bold; transition: background-color 0.2s ease, transform 0.2s ease; flex-shrink: 0; /* Prevent button from shrinking */ } #newsletter-form button:hover { background-color: var(--primary-color-darker); transform: scale(1.03); /* Slight scale effect */ } #newsletter-form button i { font-size: 0.9em; } /* Footer Bottom */ .footer-bottom { text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 1.5rem; margin-top: 1rem; /* More space above bottom */ font-size: 0.85rem; color: rgba(255, 255, 255, 0.75); /* Slightly brighter */ width: 100%; /* Ensure it spans */ } .footer-bottom p { /* Target the copyright paragraph */ margin-bottom: 0.8rem; /* Space below copyright */ } .footer-bottom a { color: var(--gold-color); text-decoration: none; margin: 0 10px; display: inline-flex; align-items: center; gap: 5px; transition: color 0.2s ease; border-bottom: 1px solid transparent; padding-bottom: 2px; } .footer-bottom a:hover { color: #ffeb3b; border-color: #ffeb3b; } .footer-bottom i { opacity: 0.8; } /* --- Popups (Payment, About, Newsletter Notification) --- */ .overlay { /* Shared overlay style */ display: none; /* Hidden by default */ position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); /* Darker overlay */ z-index: 1002; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 1rem; /* Padding for content */ overflow-y: auto; /* Allow scrolling if content overflows */ } .overlay.active { display: flex; opacity: 1; pointer-events: auto; } /* Base Popup Style */ .overlay > .form-container.glassmorphism { width: 90%; max-width: 500px; /* Default max width */ padding: 2rem; margin: auto; /* Center vertically */ border-radius: 10px; text-align: center; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); position: relative; /* For close icon */ transform: scale(0.95); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; background: var(--popup-bg-light); /* Default light background */ color: var(--text-color-dark); } .overlay.active > .form-container.glassmorphism { transform: scale(1); opacity: 1; } /* Popup Close Icons */ .overlay #payment-popup-close-icon, .overlay #close-ve-chung-toi-popup, .overlay #close-newsletter-popup-icon { position: absolute; top: 0.8rem; right: 0.8rem; background: none; border: none; font-size: 1.6rem; color: #aaa; cursor: pointer; opacity: 0.8; transition: all 0.2s ease; padding: 5px; line-height: 1; } .overlay #payment-popup-close-icon:hover, .overlay #close-ve-chung-toi-popup:hover, .overlay #close-newsletter-popup-icon:hover { opacity: 1; color: #555; transform: scale(1.1); } /* Payment Popup Specifics */ #payment-popup { max-width: 450px; /* Smaller max-width */ } #payment-popup h2 { font-size: 1.5em; margin-bottom: 1rem; color: var(--primary-color); } #payment-popup .account-info { margin-bottom: 1.5rem; } #payment-popup .account-info p { margin-bottom: 0.5rem; font-size: 1.1rem; color: #444; } #payment-popup .account-info .account-number { font-weight: bold; font-size: 1.4rem; color: var(--primary-color-darker); user-select: all; /* Allow easy selection */ } #payment-popup .qr-code { margin: 1rem auto 1.5rem; max-width: 200px; /* Limit QR code size */ } #payment-popup .qr-code img { max-width: 100%; height: auto; border: 1px solid var(--border-color); border-radius: 5px; } #payment-popup .payment-instructions { margin-bottom: 1.5rem; text-align: left; } #payment-popup .payment-instructions p { font-size: 1rem; margin-bottom: 0.5rem; color: #555; } #payment-content-template { background-color: #eee; color: #333; padding: 0.8rem; border-radius: 5px; display: block; margin-bottom: 0.8rem; font-family: monospace; overflow-wrap: break-word; border: 1px solid #ddd; user-select: all; } #reader-gmail { width: 100%; padding: 0.8rem; border: 1px solid var(--border-color); border-radius: 5px; background-color: #fff; color: #333; font-size: 1rem; margin-bottom: 1rem; } #reader-gmail::placeholder { color: #999; } #payment-popup .payment-actions { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; } #copy-payment-content-button, #close-payment-popup { padding: 0.8rem 1.5rem; border-radius: 6px; font-size: 1rem; font-weight: bold; } #copy-payment-content-button { background-color: var(--primary-color); color: white; } #copy-payment-content-button:hover { background-color: var(--primary-color-darker); } #close-payment-popup { background-color: #aaa; color: #fff; } #close-payment-popup:hover { background-color: #888; } #payment-popup .note { font-size: 0.9rem; color: #777; margin-top: 1.5rem; } /* "Về Chúng Tôi" Popup Specifics */ #ve-chung-toi-popup { max-width: 700px; /* Wider for letter */ text-align: justify; font-family: var(--font-family-primary); /* Use serif font */ background-color: #fdfbf5; /* Creamy background */ border: 2px solid #c0b283; /* Gold-ish border */ color: #4a4a4a; /* Dark grey text */ } #ve-chung-toi-popup h2 { font-size: 1.8em; color: #8b4513; /* SaddleBrown */ text-align: center; margin-bottom: 1.5rem; font-variant: small-caps; letter-spacing: 1px; } #ve-chung-toi-popup p { margin-bottom: 1.2rem; font-size: 1.1em; line-height: 1.7; } /* Newsletter Notification Popup */ #newsletter-notification-popup { max-width: 450px; } #newsletter-notification-popup h2 { color: var(--primary-color); font-size: 1.4em; margin-bottom: 1rem; } #newsletter-notification-popup p { font-size: 1rem; line-height: 1.6; color: #555; margin-bottom: 0.8rem; } #newsletter-notification-popup a { color: var(--primary-color); font-weight: bold; } #newsletter-notification-popup a:hover { color: var(--primary-color-darker); } #close-newsletter-popup-button { background-color: var(--primary-color); color: white; padding: 0.7rem 1.5rem; border-radius: 6px; font-size: 1rem; font-weight: bold; margin-top: 1rem; } #close-newsletter-popup-button:hover { background-color: var(--primary-color-darker); } /* --- Starfield (Only in Dark Mode) --- */ #starfield-sky { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; /* Behind nav, behind overlay */ display: none; /* Hidden by default */ overflow: hidden; /* Crucial */ } body.dark-mode #starfield-sky { display: block; /* Show stars only in dark mode */ } .starfield-star { position: absolute; background-color: white; border-radius: 50%; opacity: 0; /* Start invisible */ animation: starfield-twinkle 3s infinite ease-in-out alternate; /* Use alternate */ box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.3); /* Subtle glow */ } /* Vary star sizes and twinkle speeds */ .starfield-star:nth-child(5n) { width: 1px; height: 1px; animation-duration: 4s;} .starfield-star:nth-child(5n+1) { width: 2px; height: 2px; animation-duration: 2.5s;} .starfield-star:nth-child(5n+2) { width: 1.5px; height: 1.5px; animation-duration: 5s;} .starfield-star:nth-child(5n+3) { width: 1px; height: 1px; animation-duration: 3.5s;} .starfield-star:nth-child(5n+4) { width: 2.5px; height: 2.5px; animation-duration: 3s;} @keyframes starfield-twinkle { 0% { opacity: 0.1; transform: scale(0.8); } /* Dimmer start */ 100% { opacity: 0.9; transform: scale(1); } /* Brighter end */ } /* --- Enhanced Shooting Star --- */ .starfield-shooting-star { position: absolute; height: 1.5px; /* Slightly thicker */ /* Gradient: Brighter head (light cyan/blue tint), sharp fade */ background: linear-gradient(to right, rgba(180, 220, 255, 0.95), transparent 75%); border-radius: 50%; /* Soft ends */ filter: drop-shadow(0 0 6px rgba(150, 200, 255, 0.6)); /* Enhanced glow with tint */ opacity: 0; /* Animation: Apply base animation */ animation: starfield-shooting-star-flight 4s ease-in infinite; /* Use ease-in for acceleration feel */ transform-origin: left center; /* Rotate from the head */ z-index: 0; /* Above static stars but behind content */ } /* Add predictable variations using :nth-child */ .starfield-shooting-star:nth-child(4n) { width: 120px; /* Longer */ animation-duration: 5s; /* Faster */ animation-delay: 0.5s; } .starfield-shooting-star:nth-child(4n+1) { width: 70px; /* Shorter */ animation-duration: 6s; /* Slower */ animation-delay: 1.2s; /* Slightly different gradient or glow could be added */ background: linear-gradient(to right, rgba(255, 255, 200, 0.9), transparent 70%); /* Faint gold */ filter: drop-shadow(0 0 5px rgba(255, 255, 180, 0.5)); } .starfield-shooting-star:nth-child(4n+2) { width: 90px; animation-duration: 5s; animation-delay: 2s; } .starfield-shooting-star:nth-child(4n+3) { width: 100px; /* Default */ animation-duration: 6s; /* Default */ animation-delay: 0.1s; /* Almost immediate */ } /* Keyframes for the flight path and fade */ @keyframes starfield-shooting-star-flight { 0% { transform: translateX(110vw) translateY(-10vh) rotate(-35deg) scaleX(0.8); opacity: 0; } 10% { transform: translateX(95vw) translateY(0vh) rotate(-35deg) scaleX(1); opacity: 1; } 85% { transform: translateX(5vw) translateY(65vh) rotate(-35deg) scaleX(1); opacity: 1; } 100% { transform: translateX(-10vw) translateY(80vh) rotate(-35deg) scaleX(0.8); opacity: 0; } } /* --- Scroll To Top Button --- */ #scrollToTop { position: fixed; bottom: 20px; right: 20px; background-color: rgba(90, 46, 152, 0.7); /* Semi-transparent */ color: #fff; border: none; padding: 10px 12px; /* Adjust padding */ border-radius: 50%; /* Circle */ cursor: pointer; display: none; /* Hidden by default, shown by JS */ transition: all 0.3s ease; z-index: 998; /* Below loading overlay */ box-shadow: 0 2px 5px rgba(0,0,0,0.3); font-size: 1.2rem; /* Icon size */ line-height: 1; } #scrollToTop:hover { background-color: rgba(90, 46, 152, 1); /* Solid on hover */ transform: scale(1.1); } /* --- Styling cho số lượng sách trong submenu --- */ .category-count { font-size: 0.8em; /* Kích thước nhỏ hơn chữ category */ color: rgba(255, 255, 255, 0.7); /* Màu nhạt hơn */ margin-left: 5px; /* Khoảng cách với tên category */ font-style: italic; /* In nghiêng (tùy chọn) */ font-weight: normal; /* Không in đậm */ white-space: nowrap; /* Đảm bảo không xuống dòng */ } /* --- Media Query for Mobile Responsiveness --- */ @media (max-width: 768px) { body { font-size: 14px; /* Slightly smaller base font */ } .container { width: 100%; /* Use full width */ padding: 0 5px; /* Minimal side padding */ } h2 { font-size: 1.5rem; margin-bottom: 1rem; } h3 { font-size: 1.1rem; margin-bottom: 0.6rem; } /* --- Mobile Navigation --- */ #main-nav { /* Keep fixed, adjust internal layout */ } #main-nav .nav-container { width: 100%; flex-direction: column; /* Stack sections vertically */ align-items: center; /* Center items horizontally */ padding: 5px; } .nav-section-left { display: none; /* Hide logo section */ } .nav-section-right { padding: 0 5px; /* Minimal padding */ width: 100%; /* Take full width */ align-items: center; /* Center content */ } .nav-sub-flow-top, .nav-sub-flow-middle, .nav-sub-flow-bottom { padding: 4px 0; /* Reduced vertical padding */ justify-content: center; /* Center content */ width: 100%; } .nav-sub-flow-top .site-title { font-size: 1.5em; /* Smaller title */ white-space: normal; /* Allow wrapping if needed */ text-align: center; } #main-nav .menu { gap: 4px 10px; justify-content: center; width: 100%; flex-wrap: wrap; padding-bottom: 0; } /* Hide specific less critical links on mobile */ #main-nav .menu li a[data-section="lich-su-mua-hang"] { display: none; } #main-nav .menu > li > a { padding: 6px 8px; /* Smaller padding */ font-size: 0.8rem; /* Smaller font */ gap: 4px; } #main-nav .menu > li > a i { font-size: 0.8em; } #main-nav .submenu { min-width: 140px; /* Adjust width */ transform: translateX(-50%) translateY(3px); } #main-nav .submenu a { padding: 8px 10px; font-size: 0.85rem; } .right-nav { flex-wrap: wrap; /* Allow wrapping */ justify-content: center; /* Center items */ gap: 8px; /* Reduced gap */ width: 100%; } .nav-sub-flow-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 6px; } #user-info.interactive-van-xu { padding: 4px 8px; font-size: 0.8rem; gap: 5px; order: 1; /* Adjust order if needed */ } .search-container { order: 2; /* Adjust order */ flex-grow: 1; /* Allow search to take more space */ max-width: 180px; /* Limit width */ } #search-box { padding: 6px 30px 6px 10px; font-size: 0.8rem; width: 100%; /* Fill container */ } #search-button { right: 8px; font-size: 0.9em; } #search-suggestions { font-size: 0.85rem; /* Adjust suggestion font */ } .theme-toggle { order: 3; } .theme-toggle button { font-size: 1.3em; /* Slightly larger icon */ padding: 5px; } .login-menu { order: 4; } #login-button, #logout-button { padding: 5px 10px; font-size: 0.8rem; gap: 4px; } /* --- Mobile Main Content --- */ .main-content { padding-top: var(--nav-height-mobile); /* Adjust space for mobile nav */ } /* Social Icons Mobile */ .social-icons { gap: 15px; margin-bottom: 1.5rem; } .icon { width: 40px; height: 40px; font-size: 20px; } /* New Books Carousel Mobile */ .new-books-carousel { max-width: 100%; /* Full width */ margin: 0.5rem auto 1.5rem; } .new-book-item { aspect-ratio: 16 / 9; /* Common mobile aspect ratio */ } .new-book-overlay { padding: 1rem 0.8rem 0.8rem; } .new-book-overlay h3 { font-size: 1.2em; } .new-book-overlay p { font-size: 0.8em; } /* Featured Carousel Mobile */ .carousel { gap: 0.8rem; padding: 0.5rem 0.5rem 1rem; } .carousel-item { flex-basis: 150px; /* Smaller fixed width */ min-height: 320px; /* Adjusted height */ } /* Book Display Mobile */ .book-container { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* Adjust minmax */ gap: 0.8rem; /* Reduced gap */ } .book { min-height: 320px; /* Adjusted height */ padding: 0.6rem; } .book-image { margin-bottom: 0.5rem; } .book-title-container { min-height: 2.8em; margin-bottom: 0.3rem; } .book h3 { font-size: 0.95em; line-height: 1.3; } .book-publication-date { font-size: 0.7em; margin-bottom: 0.3rem; } .ratings { margin-bottom: 0.5rem; transform: scale(0.9); /* Slightly smaller stars */ } .book .purchase-button, .book .read-button { padding: 0.4rem 0.6rem; font-size: 0.75em; } .book .add-to-cart-button, .book .favorite-button { font-size: 1.1em; padding: 3px; } .button-group { gap: 0.3rem; } .button-row { gap: 0.3rem; } /* Pagination Mobile */ .pagination { margin-top: 1.5rem; gap: 0.3rem; } .pagination button { padding: 0.4rem 0.7rem; font-size: 0.8rem; } /* Auth Forms Mobile */ .auth-section { min-height: calc(100vh - var(--nav-height-mobile)); padding: 1rem 0.5rem; } .form-container { padding: 1.5rem; width: 95%; /* Slightly inset */ } .form-title { font-size: 1.5em; } .form-subtitle { font-size: 0.9em; margin-bottom: 1.5rem; } .input-group { margin-bottom: 1.5rem; } .form-input { padding: 0.8rem; font-size: 0.95em; } .input-label { left: 0.8rem; top: 0.8rem; } .form-input:focus + .input-label, .form-input:not(:placeholder-shown) + .input-label { top: -0.5rem; font-size: 0.75em; } .password-toggle-button { right: 0.6rem; font-size: 1em; } .remember-me-container { margin-bottom: 0.8rem; } .remember-me-container label { font-size: 0.85em; } .interactive-button, .sign-in-button { padding: 0.8rem 1.2rem; font-size: 1em; } .forgot-password-link { font-size: 0.85em; } .or-continue { margin: 1rem 0; font-size: 0.8em; } .social-button { width: 40px; height: 40px; font-size: 1.1em; } .form-footer { font-size: 0.9em; margin-top: 1rem; } /* History Table Mobile */ #lich-su-mua-hang table { font-size: 0.8rem; /* Reduce overall table font size */ } #lich-su-mua-hang th, #lich-su-mua-hang td { padding: 0.5rem 0.6rem; /* Reduced padding */ white-space: nowrap; /* Prevent wrapping initially */ } /* Consider making table horizontally scrollable if needed */ #lich-su-mua-hang { overflow-x: auto; /* Add scroll if table too wide */ } /* Book Details Mobile */ .book-details-content { flex-direction: column; /* Stack elements */ padding: 1rem; gap: 1.5rem; } #close-book-details-button { top: 0.5rem; right: 0.5rem; font-size: 1.5rem; } .book-cover { flex: 0 0 auto; /* Don't fix width */ width: 60%; /* Cover takes significant width */ margin: 0 auto; /* Center the cover */ max-width: 200px; /* Limit max width */ } .book-info { flex: 1; /* Take full width */ } .book-info h2 { font-size: 1.6em; } .book-info p { font-size: 0.95rem; margin-bottom: 0.6rem; } .book-actions { gap: 0.6rem; justify-content: center; /* Center buttons */ margin-top: 0.5rem; margin-bottom: 1rem; } .book-actions button { padding: 0.6rem 1rem; font-size: 0.9rem; gap: 6px; } .book-actions .tertiary-button { font-size: 1.4em; } .comments-section { margin-top: 1rem; padding-top: 1rem; } .comments-section h3 { font-size: 1.2em; } #book-details-comments { max-height: 150px; } #book-details-comment-box { font-size: 0.95rem; min-height: 60px; } #book-details-comment-submit { padding: 0.5rem 1rem; font-size: 0.9rem; } /* Footer Mobile */ .site-footer { padding: 1.5rem 0.8rem 0.8rem; border-radius: 0; /* No rounding on mobile */ } .footer-container { flex-direction: column; /* Stack sections */ gap: 1.5rem; align-items: center; /* Center sections */ } .footer-section { text-align: center; /* Center text */ min-width: auto; /* Remove min-width */ width: 100%; /* Full width */ } .footer-title { font-size: 1rem; margin-bottom: 0.6rem; } .footer-section p { font-size: 0.85rem; margin-bottom: 0.6rem; } .footer-section ul { display: flex; flex-direction: column; align-items: center; /* Center links */ } .footer-section ul li { margin-bottom: 0.4rem; } .footer-section ul li a { font-size: 0.85rem; } .footer-section .social-icons { justify-content: center; /* Center icons */ } #newsletter-form { flex-direction: column; /* Stack input and button */ align-items: stretch; /* Stretch items */ gap: 0.5rem; } #newsletter-form input { flex: none; text-align: center; padding: 0.4rem 0.8rem; height: auto; } .footer-bottom { margin-top: 1.5rem; padding-top: 1rem; font-size: 0.75rem; } .footer-bottom a { margin: 0 5px; gap: 3px; } /* Popups Mobile */ .overlay > .form-container.glassmorphism { width: 95%; /* Slightly inset */ padding: 1.5rem; /* Reduced padding */ max-height: 90vh; /* Limit height */ overflow-y: auto; /* Scroll if needed */ } .overlay #payment-popup-close-icon, .overlay #close-ve-chung-toi-popup, .overlay #close-newsletter-popup-icon { top: 0.6rem; right: 0.6rem; font-size: 1.4rem; } #payment-popup h2 { font-size: 1.3em; } #payment-popup .account-info p { font-size: 1rem; } #payment-popup .account-info .account-number { font-size: 1.2rem; } #payment-popup .payment-instructions p { font-size: 0.95rem; } #payment-content-template { padding: 0.6rem; font-size: 0.9rem; } #reader-gmail { padding: 0.7rem; font-size: 0.95rem; } #copy-payment-content-button, #close-payment-popup { padding: 0.7rem 1.2rem; font-size: 0.9rem; } #ve-chung-toi-popup h2 { font-size: 1.5em; } #ve-chung-toi-popup p { font-size: 1em; } #newsletter-notification-popup h2 { font-size: 1.3em; } #newsletter-notification-popup p { font-size: 0.95rem; } #close-newsletter-popup-button { padding: 0.6rem 1.2rem; font-size: 0.95rem; } /* ScrollToTop Mobile */ #scrollToTop { bottom: 15px; right: 15px; padding: 8px 10px; font-size: 1rem; } } /* Further adjustments for very small screens if needed */ @media (max-width: 480px) { .book-container { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Even smaller cards */ gap: 0.6rem; } .book, .carousel-item { min-height: 280px; /* Adjust height again */ padding: 0.5rem; } .book h3 { font-size: 0.85em; } .book-publication-date { font-size: 0.65em; } .ratings { transform: scale(0.8); } .book .purchase-button, .book .read-button { padding: 0.3rem 0.5rem; font-size: 0.7em; } .book .add-to-cart-button, .book .favorite-button { font-size: 1em; } .nav-sub-flow-top .site-title { font-size: 1.3em; } #main-nav .menu > li > a { padding: 5px 6px; font-size: 0.75rem; } #user-info.interactive-van-xu { font-size: 0.75rem; } #search-box { font-size: 0.75rem; } #login-button, #logout-button { font-size: 0.75rem; padding: 4px 8px; } .book-details-content { padding: 0.8rem; } .book-info h2 { font-size: 1.4em; } .book-info p { font-size: 0.9rem; } .book-actions button { padding: 0.5rem 0.8rem; font-size: 0.8rem; } .overlay > .form-container.glassmorphism { padding: 1rem; } }