.cg-container { color: #fff; padding-left: 24px; padding-right: 24px; }
.cg-title { color: #ffc107; font-family: 'Poppins', sans-serif; font-weight: 700; }
.cg-subtitle { color: rgba(255,255,255,0.75); font-family: 'Poppins', sans-serif; font-weight: 300; }

.cg-hero { width: 100%; height: calc(19vh + var(--site-header-h, 0px)); min-height: 160px; background: url('/images/caricature.png') center/cover no-repeat; position: relative; display: flex; align-items: center; margin-top: calc(-1 * var(--site-header-h, 0px)); }
.cg-hero::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 25%; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, #000 100%); pointer-events: none; }
.cg-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.78), rgba(0,0,0,0.58)); }
.cg-hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1200px; margin: 50px auto 0; padding: 0 24px; text-align: center; }
.cg-hero-title { color: #ffc107; font-size: 2rem; font-weight: 400; margin: 0 0 6px; font-family: 'M PLUS Rounded 1c', 'Poppins', sans-serif; }
.cg-hero-desc { color: rgba(255,255,255,0.85); font-size: 1rem; margin: 0; max-width: 680px; margin-left: auto; margin-right: auto; }

.cg-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 1400px) { .cg-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 992px) { .cg-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .cg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .cg-grid { grid-template-columns: 1fr; } }

.cg-item {
  background: rgba(26,26,26,0.6);
  border: 1px solid rgba(255,193,7,0.12);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .25s ease;
}
.cg-item:hover {
  border-color: rgba(255,193,7,0.35);
}

.cg-image-wrap { position: relative; padding-top: 133.333%; aspect-ratio: 3 / 4; overflow: hidden; }
.cg-image {
  position: absolute; top:0; left:0; width:100%; height:100%; object-fit: cover;
}
.cg-image { cursor: zoom-in; }

.cg-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
}

.cg-user { display: flex; align-items: center; gap: 8px; }
.cg-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,0.18); }
.cg-nickname { color: rgba(255,255,255,0.9); font-weight: 500; font-size: 0.95rem; }

.cg-actions { display: flex; align-items: center; gap: 10px; }
.cg-btn { display: inline-flex; align-items: center; gap:6px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.2); color:#fff; cursor: pointer; transition: all .2s ease; }
.cg-btn:hover { }
.cg-like { border-color: rgba(0,200,83,0.4); background: rgba(0,200,83,0.15); color: #00c853; }
.cg-like:hover { background: rgba(0,200,83,0.25); border-color: rgba(0,200,83,0.6); color: #00e676; }
.cg-dislike { border-color: rgba(244,67,54,0.4); background: rgba(244,67,54,0.15); color: #f44336; }
.cg-dislike:hover { background: rgba(244,67,54,0.25); border-color: rgba(244,67,54,0.6); color: #ff5252; }
.cg-count { font-weight: 400; }
.cg-auth-hint { color: rgba(255,255,255,0.6); font-size: 0.9rem; }

/* Modal */
.cg-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none; align-items: center; justify-content: center; z-index: 1050; }
.cg-modal.open { display: flex; }
.cg-modal-image { max-width: 90vw; max-height: 90vh; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.cg-modal-close { position: absolute; top: 16px; right: 16px; background: rgba(0,0,0,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.cg-modal-close:hover { background: rgba(0,0,0,0.65); }

/* Modal navigation arrows */
.cg-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: #ffc107; color: #000; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.cg-nav:disabled { opacity: 0.5; cursor: not-allowed; }
.cg-nav i { font-size: 20px; }
.cg-nav-prev { left: 18px; }
.cg-nav-next { right: 18px; }
.cg-nav:hover { filter: brightness(0.95); }


