/* Google Fonts are now preconnected via HTML link tags for faster loading */

:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --secondary: #a855f7;
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Outfit', sans-serif; background-color: var(--bg-dark); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }

/* Background glows */
.bg-glow { position: fixed; border-radius: 50%; filter: blur(150px); opacity: 0.15; z-index: -1; pointer-events: none; will-change: transform; transform: translateZ(0); }
.glow-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--primary); }
.glow-2 { bottom: -10%; right: -10%; width: 600px; height: 600px; background: var(--secondary); }

/* Header Navbar */
header {
  position: fixed; top: 0; width: 100%; z-index: 50;
  background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border); padding: 1.2rem 5%;
  display: flex; justify-content: space-between; align-items: center;
}
.logo-container { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.logo-t {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; font-weight: 800; font-size: 1.5rem;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.logo-text { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.5px; }
.logo-text .tech { color: #ffffff; }
.logo-text .hub { color: #94a3b8; }

nav ul { display: flex; gap: 2rem; list-style: none; }
nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.3s; }
nav a:hover { color: var(--text-main); }

/* Sections Common */
section { min-height: 100vh; padding: 120px 5% 50px; display: flex; flex-direction: column; justify-content: center;}

/* Home / Hero */
#home { text-align: center; align-items: center; }
.hero-title { font-size: 4.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; }
.hero-title span { background: linear-gradient(to right, var(--primary-light), var(--secondary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero-desc { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin-bottom: 2.5rem; }
.btn {
  display: inline-block; padding: 1rem 2.5rem; font-weight: 600; color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 9999px; text-decoration: none; transition: all 0.3s ease; border: none; cursor: pointer;
  box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 15px 25px -5px rgba(99, 102, 241, 0.5); }

/* Titles */
.section-title { font-size: 2.5rem; margin-bottom: 2rem; position: relative; display: inline-block; }
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 50px; height: 4px; background: var(--primary); border-radius: 2px; }

/* Book Collection */
#book-collection { justify-content: flex-start; }

.category-filters { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.filter-btn {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  color: var(--text-muted); padding: 0.75rem 1.5rem; border-radius: 12px;
  cursor: pointer; transition: all 0.3s; font-weight: 500;
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(99, 102, 241, 0.15); border-color: var(--primary); color: white;
}

.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; margin-bottom: 4rem; }
.book-card {
  background: linear-gradient(180deg, var(--bg-darker) 0%, rgba(99, 102, 241, 0.08) 100%); border: 1px solid var(--glass-border); border-radius: 16px;
  padding: 1.5rem; transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column; height: 100%;
}
.book-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.15); }
.book-cover { width: 100%; height: 320px; background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15)); border-radius: 8px; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-tag { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); padding: 5px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; color: var(--primary-light); }
.book-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.4; flex-grow: 1;}
.book-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn-outline {
  background: transparent; border: 1px solid var(--glass-border); color: var(--text-main);
  padding: 0.75rem; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.3s;
  text-align: center; text-decoration: none;
}
.btn-outline:hover { background: rgba(255,255,255,0.05); }
.btn-buy {
  background: var(--primary); border: 1px solid var(--primary); color: white;
  padding: 0.75rem; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.3s;
  text-align: center; text-decoration: none;
}
.btn-buy:hover { background: var(--primary-light); }

/* Features Section */
.featured-section { margin-bottom: 4rem; }
.featured-section .books-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.featured-label { display: inline-flex; align-items: center; gap: 0.5rem; color: #fbbf24; font-weight: 700; margin-bottom: 1.5rem; font-size: 1.2rem; }

/* Modal / Pop-Up */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(2, 6, 23, 0.85); backdrop-filter: blur(8px);
  z-index: 100; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  padding: 20px;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content {
  background: var(--bg-dark); border: 1px solid var(--glass-border);
  border-radius: 20px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto;
  padding: 2.5rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  transform: translateY(20px); transition: transform 0.3s ease;
  position: relative;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close {
  position: absolute; top: 20px; right: 20px; background: none; border: none;
  color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: 0.3s;
}
.modal-close:hover { color: white; }

.modal-header { display: flex; gap: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 1.5rem; }
.modal-cover { width: 100px; height: 140px; background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15)); border-radius: 8px; object-fit: cover; }
.modal-title-area { flex-grow: 1; }
.modal-book-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.3;}
.modal-badge { display: inline-block; background: rgba(99, 102, 241, 0.15); color: var(--primary-light); padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }

.modal-body h4 { font-size: 1.1rem; color: white; margin: 1.5rem 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.modal-list { list-style-position: inside; color: var(--text-muted); margin-bottom: 1rem; }
.modal-list li { margin-bottom: 0.25rem; }
.modal-info-grid { display: grid; grid-template-columns: 100px 1fr; gap: 0.5rem; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.modal-info-label { font-weight: 600; color: #cbd5e1; }

.audience-tags { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tag-pro { 
  display: inline-block; color: #93c5fd; font-weight: 700;
  background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 4px 14px; border-radius: 99px; font-size: 0.95rem;
}
.tag-expert { 
  display: inline-block; color: #fca5a5; font-weight: 700;
  background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 4px 14px; border-radius: 99px; font-size: 0.95rem;
}
.tag-beginner { 
  display: inline-block; color: #6ee7b7; font-weight: 700;
  background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 4px 14px; border-radius: 99px; font-size: 0.95rem;
}
.why-buy-list { list-style: none; }
.why-buy-list li::before { content: '✓ '; color: #10b981; font-weight: bold; }

/* About Section */
#about { min-height: 60vh; align-items: center; justify-content: center;}
.about-card { background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 3rem; border-radius: 24px; max-width: 800px; width: 100%; text-align: center; }
.social-links { display: flex; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
.social-links a { color: var(--text-main); font-size: 1.1rem; font-weight:bold; letter-spacing:1px; text-decoration:none; transition: color 0.3s, background 0.3s; background: rgba(255,255,255,0.05); width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--glass-border); }
.social-links a svg { width: 24px; height: 24px; fill: currentColor; }
.social-links a:hover { color: white; background: var(--primary); border-color: var(--primary); box-shadow: 0 5px 15px rgba(99,102,241,0.4);}
.contact-info { margin-top: 2rem; color: var(--text-muted); font-size:1.1rem; line-height:2;}
.contact-info a { color: var(--primary-light); text-decoration: none; }

/* Footer */
footer { background: var(--bg-darker); border-top: 1px solid var(--glass-border); padding: 4rem 5% 2rem; margin-top:4rem;}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-col h3 { color: white; font-size: 1.2rem; margin-bottom: 1.5rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul a { color: var(--text-muted); text-decoration: none; transition: 0.3s; }
.footer-col ul a:hover { color: var(--primary-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.9rem; flex-wrap: wrap; gap: 1rem; }
.legal-links { display: flex; gap: 1.5rem; }
.legal-links a { color: var(--text-muted); text-decoration: none; transition: 0.3s; }
.legal-links a:hover { color: white; }

/* Responsive */
.menu-toggle { display: none; background: transparent; border: none; font-size: 2rem; color: white; cursor: pointer; transition: color 0.3s; }
.menu-toggle:hover { color: var(--primary-light); }

@media (max-width: 768px) {
  .hero-title { font-size: 3rem; }
  .menu-toggle { display: block; }
  nav ul {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(16px);
    display: flex; flex-direction: column; padding: 1.5rem 0; gap: 1.5rem;
    align-items: center; border-bottom: 1px solid var(--glass-border);
    transform: translateY(-20px); opacity: 0; pointer-events: none; transition: all 0.3s ease;
  }
  nav ul.active {
    opacity: 1; pointer-events: all; transform: translateY(0);
  }

  .footer-bottom { flex-direction: column; text-align: center; }
  section { padding: 100px 5% 50px; }
}

/* Pricing and Asset Features */
.book-price { font-size: 1.4rem; font-weight: 800; color: #fbbf24; margin-bottom: 1rem; }
.m-price-tag { font-size: 1.3rem; font-weight: 700; color: #fbbf24; margin: 1rem 0; display: inline-block; background: rgba(251, 191, 36, 0.1); padding: 5px 15px; border-radius: 8px; border: 1px solid rgba(251, 191, 36, 0.3); }

.samples-container { display: flex; gap: 1rem; overflow-x: auto; padding: 10px 0; margin-bottom: 1.5rem; scrollbar-width: thin; }
.samples-container::-webkit-scrollbar { height: 6px; }
.samples-container::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; }
.samples-container::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }
.sample-img { width: 120px; height: 160px; object-fit: cover; border-radius: 8px; border: 1px solid var(--glass-border); transition: transform 0.3s, border-color 0.3s; cursor: pointer; flex-shrink: 0; background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1)); }
.sample-img:hover { transform: scale(1.05); border-color: var(--primary-light); }

/* Zoom Modal */
.zoom-modal-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    cursor: zoom-out;
}
.zoom-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation-name: zoomIn;
    animation-duration: 0.3s;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
@keyframes zoomIn {
    from {transform:scale(0); opacity:0;}
    to {transform:scale(1); opacity:1;}
}
.zoom-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
.zoom-close:hover {
    color: var(--primary-light);
}

/* Toast Notification */
.toast {
  visibility: hidden; min-width: 250px; background-color: var(--primary);
  color: #fff; text-align: center; border-radius: 8px; padding: 16px;
  position: fixed; z-index: 10001; right: 30px; bottom: 30px; font-weight: 600;
  opacity: 0; transition: opacity 0.5s, visibility 0.5s, transform 0.5s;
  transform: translateY(20px); box-shadow: 0 10px 25px rgba(168, 85, 247, 0.4);
}
.toast.show {
  visibility: visible; opacity: 1; transform: translateY(0);
}

/* Share Button — Icon + Label */
.btn-share {
  width: 30%;
  min-width: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(129,140,248,0.1);
  border: 1.5px solid var(--primary-light);
  color: var(--primary-light);
  border-radius: 9999px;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}
.btn-share svg {
  flex-shrink: 0;
  stroke: currentColor;
  display: block;
}
.btn-share:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--secondary);
  color: #fff;
  box-shadow: 0 0 16px rgba(168,85,247,0.35);
}
@media (max-width: 480px) {
  .btn-share span { display: none; }
  .btn-share { width: auto; padding: 0.75rem 1rem; }
}

/* Discount & Price Styles - Psychological Design */
.price-container { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 0.5rem; }
.original-price { font-size: 1.15rem; color: #94a3b8; text-decoration: line-through; text-decoration-color: #ef4444; text-decoration-thickness: 2px; font-weight: 600; margin-right: 8px; }
.discount-badge { background: #ef4444; color: white; padding: 3px 10px; font-size: 0.8rem; border-radius: 6px; font-weight: 800; letter-spacing: 0.5px; display: inline-block; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3); vertical-align: middle; }

/* ============================
   Social Share Popup Modal
   ============================ */
.share-popup-overlay {
  position: fixed; inset: 0; z-index: 10002;
  background: rgba(2, 6, 23, 0.75); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 0 0 0 0;
}
.share-popup-overlay.active { opacity: 1; pointer-events: all; }
.share-popup-sheet {
  background: #1e293b;
  border: 1px solid var(--glass-border);
  border-radius: 24px 24px 0 0;
  padding: 2rem 2rem 2.5rem;
  width: 100%; max-width: 600px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}
.share-popup-overlay.active .share-popup-sheet {
  transform: translateY(0);
}
.share-popup-handle {
  width: 40px; height: 4px; background: rgba(255,255,255,0.2);
  border-radius: 99px; margin: 0 auto 1.5rem;
}
.share-popup-title {
  font-size: 1rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.5rem;
  text-align: center;
}
.share-options-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem;
  margin-bottom: 1.5rem;
}
.share-option {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; cursor: pointer; background: none; border: none;
  color: var(--text-muted); transition: all 0.2s ease;
  padding: 0.75rem 0.5rem; border-radius: 12px;
  text-decoration: none;
}
.share-option:hover { background: rgba(255,255,255,0.07); color: #fff; transform: translateY(-2px); }
.share-option-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.share-option-icon svg { width: 28px; height: 28px; }
.share-option span { font-size: 0.75rem; font-weight: 600; text-align: center; line-height: 1.2; }

/* Platform icon background colors */
.share-icon-wa   { background: #25d366; }
.share-icon-tg   { background: #229ed9; }
.share-icon-li   { background: #0a66c2; }
.share-icon-ig   { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
.share-icon-copy { background: rgba(129,140,248,0.2); border: 1.5px solid var(--primary-light); }
.share-icon-copy svg { stroke: var(--primary-light); }
.share-popup-close-btn {
  display: block; width: 100%;
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
  color: var(--text-muted); padding: 0.85rem; border-radius: 12px;
  font-weight: 600; cursor: pointer; transition: 0.3s;
  font-size: 0.95rem;
}
.share-popup-close-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
@media (max-width: 480px) {
  .share-options-grid { grid-template-columns: repeat(3, 1fr); }
  .share-popup-sheet { padding: 1.5rem 1.5rem 2rem; }
}
