/* ===================================================
   FreeFlow — Cards & Special Components
   =================================================== */

/* ──────────────────────────────────────
   Collab Post Cards
────────────────────────────────────── */
.collab-card-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.collab-card-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.collab-card-item.type-collab {
  border-right: 3px solid var(--primary);
}

.collab-card-item.type-skills_exchange {
  border-right: 3px solid var(--green);
}

.collab-card-item .collab-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.collab-card-item .collab-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.collab-card-item .collab-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.collab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.collab-tag {
  padding: 3px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-muted);
}

.collab-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.collab-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.collab-status.open   { color: var(--green); }
.collab-status.closed { color: var(--text-dim); }

/* ──────────────────────────────────────
   Win Cards (Celebration)
────────────────────────────────────── */
.win-card-special {
  background: linear-gradient(135deg, #1A1500, var(--card));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.win-card-special::after {
  content: '🏆';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 60px;
  opacity: 0.06;
  line-height: 1;
}

.win-content {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 14px;
  position: relative;
}

/* ──────────────────────────────────────
   Room Cards (Rooms List)
────────────────────────────────────── */
.room-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
}

.room-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.room-card.pro-room {
  border-color: rgba(245, 158, 11, 0.3);
}

.room-card.pro-room:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.room-card.locked {
  opacity: 0.7;
  cursor: pointer;
}

.room-card-icon {
  font-size: 36px;
}

.room-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.room-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}

/* ──────────────────────────────────────
   Pricing Cards
────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.pricing-card .price-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.pricing-card .price {
  font-size: 48px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-card .price-unit {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pricing-card .pricing-features {
  list-style: none;
  text-align: right;
  margin-bottom: 24px;
}

.pricing-card .pricing-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-card .pricing-features li:last-child {
  border-bottom: none;
}

.pricing-card .pricing-features .check {
  color: var(--green);
  font-size: 16px;
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* ──────────────────────────────────────
   Notification / Toast
────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.toast.success { border-right: 3px solid var(--green); }
.toast.error   { border-right: 3px solid var(--red); }
.toast.info    { border-right: 3px solid var(--primary); }

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ──────────────────────────────────────
   Search
────────────────────────────────────── */
.search-box {
  position: relative;
}

.search-box input {
  padding-right: 40px;
}

.search-box .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

/* ──────────────────────────────────────
   Progress / Level
────────────────────────────────────── */
.level-progress {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.level-progress .level-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.level-progress .current-level {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-light);
}

.level-progress .points-text {
  font-size: 13px;
  color: var(--text-muted);
}

.level-progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.level-progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ──────────────────────────────────────
   Skeleton Loading
────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--card-hover) 50%, var(--border) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.skeleton-text  { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }

/* ──────────────────────────────────────
   Modal
────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: popIn 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 18px; font-weight: 800; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

/* ──────────────────────────────────────
   Online indicators
────────────────────────────────────── */
.online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  display: inline-block;
  flex-shrink: 0;
}

.online-dot.offline { background: var(--text-dim); box-shadow: none; }

/* ──────────────────────────────────────
   Character Counter
────────────────────────────────────── */
.char-counter {
  font-size: 11px;
  color: var(--text-dim);
  text-align: left;
}

.char-counter.near-limit { color: var(--gold); }
.char-counter.at-limit   { color: var(--red); }

/* ──────────────────────────────────────
   Pro Lock Overlay
────────────────────────────────────── */
.pro-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,15,15,0.85);
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  backdrop-filter: blur(2px);
  z-index: 10;
}

.pro-lock-icon { font-size: 36px; }
.pro-lock-text { font-size: 14px; font-weight: 600; color: var(--text-muted); text-align: center; }
