@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --accent-pink: #ec4899;
  --text: #0f172a;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.2);
  --radius: 20px;
  --radius-sm: 14px;
  --sidebar-width-collapsed: 50px;
  --sidebar-width-expanded: 280px;
  --footer-height: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

#page-wrapper {
  padding-bottom: var(--footer-height);
}



 .top {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
        color: white;
        padding: 32px 24px;
        position: relative;
        overflow: visible; 
        box-shadow: var(--shadow-lg);
        margin-left: var(--sidebar-width-collapsed);
        margin-right: 30px;
        z-index: 1000;
    }
 
.top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.top::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.container {
  max-width: auto;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  animation: fadeInDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.brand-text {
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.brand-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  margin-top: 2px;
}

.search-row input::placeholder {
  color: #94a3b8;
}

.nav {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.nav a {
  color: rgba(255, 255, 255, 0.98);
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.2);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  border-color: rgba(255,255,255,0.4);
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  height: 100vh;
  z-index: 1001;
  background: var(--card);
  width: var(--sidebar-width-collapsed);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.sidebar-left {
  left: 0;
  border-right: 1px solid rgba(99, 102, 241, 0.15);
}

.sidebar-right {
  right: 0;
  border-left: 1px solid rgba(236, 72, 153, 0.15);
}

.sidebar:hover {
  width: var(--sidebar-width-expanded);
  box-shadow: var(--shadow-xl);
}

.sidebar-strip {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width-collapsed);
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  gap: 8px;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.sidebar-right .sidebar-strip {
  background: linear-gradient(180deg, var(--accent-pink) 0%, #be185d 100%);
}

.sidebar-left .sidebar-strip {
  left: 0;
}

.sidebar-right .sidebar-strip {
  right: 0;
}

.sidebar:hover .sidebar-strip {
  opacity: 0;
  pointer-events: none;
}

.sidebar-strip-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  border-radius: 8px;
  background: rgba(255,255,255,0.15);
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.sidebar-strip-icon:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.1);
}

.sidebar-strip-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: white;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: auto;
  opacity: 0.9;
}

.sidebar-content {
  width: var(--sidebar-width-expanded);
  padding: 32px 24px;
  opacity: 0;
  transition: opacity 0.4s ease 0.1s;
  overflow-y: auto;
  height: 100%;
}

.sidebar:hover .sidebar-content {
  opacity: 1;
}

.sidebar-content h3 {
  margin: 0 0 24px 0;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.sidebar-right .sidebar-content h3 {
  background: linear-gradient(135deg, var(--accent-pink) 0%, #be185d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-content ul li {
  margin-bottom: 4px;
}

.sidebar-content ul a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.sidebar-content ul a .link-icon {
  font-size: 18px;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-content ul a:hover {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.15) 100%);
  transform: translateX(6px);
  border-color: rgba(99, 102, 241, 0.2);
}

.sidebar-right .sidebar-content ul a:hover {
  color: var(--accent-pink);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, rgba(236, 72, 153, 0.15) 100%);
  transform: translateX(-6px);
  border-color: rgba(236, 72, 153, 0.2);
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
  border: none;
  width: 24px;
  height: 60px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-weight: 900;
  font-size: 16px;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border-radius: 0;
}

.sidebar-toggle-left {
  left: 0;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 0 8px 8px 0;
}

.sidebar-toggle-right {
  right: 0;
  background: linear-gradient(90deg, #be185d 0%, var(--accent-pink) 100%);
  border-radius: 8px 0 0 8px;
}

.sidebar-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  animation: fadeIn 0.3s ease;
}

.sidebar-overlay.open {
  display: block;
}

.main-content {
  margin-left: var(--sidebar-width-collapsed);
  margin-right: var(--sidebar-width-collapsed);
  transition: margin 0.4s ease;
}

.content {
  max-width: auto;
  padding: 56px 32px;
}

footer {
  margin-top: 100px;
  padding: 48px 0;
  border-top: 2px solid rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  text-align: center;
}

.sticky-footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  background: var(--card);
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 20px;
}

.sticky-footer-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.sticky-footer-nav a .nav-icon {
  font-size: 20px;
}

.sticky-footer-nav a:hover,
.sticky-footer-nav a.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Book Review Styles */
.cg-book-review{
  --cg-accent:#667eea;
  --cg-accent-hover:#5568d3;
  --cg-like:#ef4444;
  --cg-star:#f59e0b;
  --cg-text:#1a1a1a;
  --cg-muted:#6b7280;
  --cg-border:#e5e7eb;
  --cg-bg-light:#f9fafb;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color:var(--cg-text);
  line-height:1.6;
}

.cg-book-review .cg-container{
  max-width:AUTO;
  margin:24px auto;
  background:#fff;
  border-radius:20px;
  box-shadow:0 20px 60px rgba(102, 126, 234, 0.12), 0 8px 24px rgba(0,0,0,0.06);
  overflow:hidden;
  transition:transform 0.3s ease, box-shadow 0.3s ease;
}

.cg-book-review .cg-container:hover{
  transform:translateY(-4px);
  box-shadow:0 24px 70px rgba(102, 126, 234, 0.18), 0 12px 32px rgba(0,0,0,0.1);
}

.cg-book-review .cg-main{
  display:grid;
  grid-template-columns:360px 1fr;
  gap:40px;
  padding:40px;
}

.cg-book-review .cg-cover-section{ position:relative; }

.cg-book-review .cg-cover{
  width:100%; height:500px; object-fit:cover;
  border-radius:16px;
  box-shadow:0 12px 40px rgba(0,0,0,0.2);
  transition:transform 0.3s ease;
}
.cg-book-review .cg-cover:hover{ transform:scale(1.02); }

.cg-book-review .cg-content{ display:flex; flex-direction:column; gap:24px; }
.cg-book-review .cg-header{ display:flex; flex-direction:column; gap:12px; }

.cg-book-review .cg-title{ font-size:32px; font-weight:700; margin:0; letter-spacing:-0.5px; color:var(--cg-text); }

.cg-book-review .cg-author-link{
  font-size:18px; color:var(--cg-accent); text-decoration:none;
  display:inline-flex; align-items:center; gap:8px; font-weight:600;
  transition:all 0.2s ease; width:fit-content;
}
.cg-book-review .cg-author-link:hover{ color:var(--cg-accent-hover); gap:10px; }

.cg-book-review .cg-rating-section{ display:flex; gap:24px; align-items:center; flex-wrap:wrap; }

.cg-book-review .cg-rating-display{
  display:flex; align-items:center; gap:12px; padding:12px 20px;
  background:linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius:16px;
}

.cg-book-review .cg-stars{ color:var(--cg-star); font-size:20px; letter-spacing:2px; }
.cg-book-review .cg-rating-value{ font-size:20px; font-weight:700; color:var(--cg-text); }
.cg-book-review .cg-rating-count{ font-size:14px; color:var(--cg-muted); }

.cg-book-review .cg-rate-widget{ display:flex; align-items:center; gap:12px; }
.cg-book-review .cg-rate-label{ font-size:14px; font-weight:600; color:var(--cg-muted); }

.cg-book-review .cg-star-rating{ display:flex; gap:4px; }
.cg-book-review .cg-star-btn{
  background:none; border:none; cursor:pointer; font-size:28px; color:#d1d5db;
  transition:all 0.2s ease; padding:0;
}
.cg-book-review .cg-star-btn:hover,
.cg-book-review .cg-star-btn.active{ color:var(--cg-star); transform:scale(1.15); }

.cg-book-review .cg-details-table{
  width:100%; border-collapse:collapse; background:var(--cg-bg-light);
  border-radius:12px; overflow:hidden;
}
.cg-book-review .cg-details-table tr{ border-bottom:1px solid var(--cg-border); }
.cg-book-review .cg-details-table tr:last-child{ border-bottom:none; }
.cg-book-review .cg-details-table td{ padding:14px 20px; }
.cg-book-review .cg-details-table td:first-child{ font-weight:700; color:var(--cg-text); width:140px; font-size:14px; }
.cg-book-review .cg-details-table td:last-child{ color:var(--cg-muted); font-size:14px; }

.cg-book-review .cg-buttons{ display:flex; gap:12px; flex-wrap:wrap; }
.cg-book-review .cg-btn{
  background:var(--cg-accent); color:#fff; border:none; padding:14px 28px;
  border-radius:12px; cursor:pointer; font-size:15px; font-weight:600;
  transition:all 0.3s ease; box-shadow:0 4px 12px rgba(102, 126, 234, 0.3);
  display:inline-flex; align-items:center; gap:10px;
}
.cg-book-review .cg-btn:hover{
  background:var(--cg-accent-hover); transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(102, 126, 234, 0.4);
}

.cg-book-review .cg-section{ padding:28px; background:#fff; border-radius:12px; border:2px solid var(--cg-border); }
.cg-book-review .cg-section-title{
  font-size:20px; font-weight:700; margin:0 0 16px 0; color:var(--cg-text);
  display:flex; align-items:center; gap:10px;
}
.cg-book-review .cg-section-content{ color:var(--cg-text); line-height:1.8; font-size:15px; margin:0; }

.cg-book-review .cg-summary-section{ border-left:4px solid #f59e0b; background:linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); }
.cg-book-review .cg-review-section{ border-left:4px solid var(--cg-accent); background:linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%); }

.cg-comment-input-box textarea { width: 100%; padding: 15px; border: 2px solid var(--cg-border); border-radius: 12px; resize: vertical; font-family: inherit; }
.cg-comment-input-box textarea:focus { outline: none; border-color: var(--cg-accent); }
.cg-comments-list { margin-top: 30px; }
.cg-single-comment { padding: 20px 0; border-bottom: 1px solid var(--cg-border); animation: fadeIn 0.5s ease; }

.cg-replies-container { margin-left: 50px; margin-top: 10px; border-left: 2px solid #e5e7eb; padding-left: 20px; }

.cg-comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cg-user-info { display: flex; align-items: center; gap: 12px; }
.cg-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, #667eea, #764ba2); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 18px; }
.cg-username { font-weight: 700; color: var(--cg-text); font-size: 15px; }
.cg-time { font-size: 12px; color: var(--cg-muted); }
.cg-comment-body { font-size: 15px; line-height: 1.6; color: #4b5563; margin-bottom: 12px; }

.cg-comment-footer { display: flex; gap: 15px; align-items: center; }

.cg-btn-text { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--cg-muted); padding: 5px 10px; font-weight: 600; transition: all 0.2s; display: flex; align-items: center; gap: 5px; border-radius: 6px; }
.cg-btn-text:hover { background: #f3f4f6; color: var(--cg-accent); }
.cg-btn-text.liked { color: #ef4444; }
.cg-btn-text.liked:hover { background: #fee2e2; }

.cg-reply-form { margin-top: 15px; display: none; }
.cg-reply-form.active { display: block; animation: fadeIn 0.3s; }
.cg-reply-textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 8px; min-height: 60px; }

.cg-btn-xs.delete { background: #fee2e2; color: #ef4444; border: none; padding: 5px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.cg-btn-xs.delete:hover { background: #fecaca; }

@media (max-width:900px){
  .cg-book-review .cg-main{ grid-template-columns:1fr; gap:32px; padding:32px 24px; }
  .cg-book-review .cg-cover{ height:600px; }
  .cg-book-review .cg-title{ font-size:28px; }
}

@media (max-width: 968px) {
  .main-content {
      max-width: auto;
    margin-left: 0;
    margin-right: 0;
  }

  .top {
    margin-left: 0;
    margin-right: 0;
    padding: 24px 20px;
  }

  .brand {
    gap: 14px;
  }

  .logo {
    width: 52px;
    height: 52px;
    font-size: 26px;
  }

  .brand-text {
    font-size: 22px;
  }

  .brand-subtitle {
    font-size: 14px;
  }

  .search-row {
    flex-direction: column;
    margin-top: 24px;
    gap: 12px;
  }

  .search-row input,
  .search-row button {
    width: 100%;
  }

  .content {
    padding: 32px 20px;
  }

  .sidebar {
    width: 300px;
    box-shadow: var(--shadow-xl);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none !important;
  }

  .sidebar:hover {
    width: 300px;
  }

  .sidebar-strip {
    display: none;
  }

  .sidebar-content {
    opacity: 1;
    width: 300px;
  }

  .sidebar-left {
    transform: translateX(-100%);
  }

  .sidebar-left.open {
    transform: translateX(0);
  }

  .sidebar-right {
    transform: translateX(100%);
  }

  .sidebar-right.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .sticky-footer-nav {
    justify-content: space-around;
  }
  .sticky-footer-nav a {
    padding: 6px 8px;
    font-size: 11px;
  }
  .sticky-footer-nav a .nav-icon {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 24px 16px;
  }

  .nav a {
    padding: 9px 16px;
    font-size: 13px;
  }
}











