/* assets/css/style.css - Pinterest Modern Style */

:root {
  --primary: #e60023;
  --primary-hover: #b6001a;
  --bg-color: #ffffff;
  --bg-card: #ffffff;
  --bg-secondary: #f0f0f0;
  --bg-hover: #e2e2e2;
  --text-main: #111111;
  --text-muted: #5f5f5f;
  --text-subtle: #767676;
  --border-color: #e5e5e5;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-hover: 0 10px 25px -5px rgba(0,0,0,0.15);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-main);
}

.app-main-logo {
  height: 44px;
  max-width: 170px;
  object-fit: contain;
  display: block;
  transition: var(--transition);
}

.logo-container:hover .app-main-logo {
  transform: scale(1.04);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(230, 0, 35, 0.3);
  transition: var(--transition);
}

.logo-container:hover .logo-icon {
  transform: scale(1.05);
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  background-color: var(--bg-secondary);
}

.nav-btn.active {
  background-color: var(--text-main);
  color: white;
}

/* Search bar */
.search-container {
  flex: 1;
  position: relative;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background-color: #f1f1f1;
  border-radius: var(--radius-full);
  padding: 10px 18px;
  transition: var(--transition);
  border: 2px solid transparent;
}

.search-input-wrapper:focus-within {
  border-color: #a8a8a8;
  background-color: white;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}

.search-icon {
  color: var(--text-subtle);
  margin-left: 10px;
  font-size: 16px;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main);
}

.search-input::placeholder {
  color: var(--text-subtle);
}

.search-clear {
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-clear:hover {
  background-color: var(--bg-hover);
}

/* Header right actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
  position: relative;
}

.action-btn-circle:hover {
  background-color: var(--bg-secondary);
  color: var(--text-main);
}

.badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
}

.user-avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.user-avatar-btn:hover {
  border-color: var(--text-main);
}

.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Categories Bar */
.categories-bar {
  padding: 10px 24px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background-color: var(--bg-secondary);
  color: var(--text-main);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-chip:hover {
  background-color: var(--bg-hover);
}

.cat-chip.active {
  background-color: var(--text-main);
  color: white;
}

/* Main Content & Masonry Grid */
.main-container {
  padding: 8px 24px 60px;
  max-width: 1800px;
  margin: 0 auto;
}

.masonry-grid {
  column-count: 5;
  column-gap: 16px;
}

@media (max-width: 1400px) {
  .masonry-grid { column-count: 4; }
}
@media (max-width: 1100px) {
  .masonry-grid { column-count: 3; }
}
@media (max-width: 768px) {
  .masonry-grid { column-count: 2; }
  .app-header { padding: 10px 12px; gap: 8px; }
  .main-container { padding: 8px 12px 60px; }
  .logo-text { display: none; }
}
@media (max-width: 480px) {
  .masonry-grid { column-count: 2; column-gap: 10px; }
}

/* Pin Card */
.pin-card {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.pin-media-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #f1f1f1;
  box-shadow: var(--shadow-card);
}

.pin-img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pin-card:hover .pin-img {
  transform: scale(1.02);
}

/* Pin Overlay */
.pin-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  border-radius: var(--radius-md);
  pointer-events: none;
}

.pin-card:hover .pin-overlay {
  opacity: 1;
  pointer-events: auto;
}

.pin-overlay-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pin-board-select {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  max-width: 140px;
  text-overflow: ellipsis;
}

.btn-save-pin {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-save-pin:hover {
  background-color: var(--primary-hover);
  transform: scale(1.04);
}

.btn-save-pin.saved {
  background-color: #111111;
}

.pin-overlay-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pin-link-chip {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(4px);
}

.pin-overlay-actions {
  display: flex;
  gap: 8px;
  margin-right: auto;
}

.btn-circle-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.btn-circle-action:hover {
  background: white;
  transform: scale(1.1);
}

.btn-circle-action.liked {
  color: var(--primary);
}

/* Pin Card Details */
.pin-info {
  padding: 8px 4px 4px;
}

.pin-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pin-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.pin-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.pin-likes-count {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text-subtle);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    transform: translateY(30px) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 18px;
  z-index: 10;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--bg-hover);
  transform: scale(1.05);
}

/* Detail Modal Specifics */
.pin-detail-modal {
  width: 1000px;
  max-width: 95vw;
  display: flex;
  border-radius: 32px;
  overflow: hidden;
}

@media (max-width: 850px) {
  .pin-detail-modal {
    flex-direction: column;
    width: 100%;
  }
}

.pin-detail-left {
  flex: 1.2;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 450px;
  position: relative;
}

.pin-detail-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.pin-detail-right {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow-y: auto;
}

.detail-actions-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.detail-top-btns {
  display: flex;
  gap: 8px;
}

.detail-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--text-main);
}

.detail-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag-badge {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.tag-badge:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.detail-author-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.author-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-large-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name-text {
  font-weight: 600;
  font-size: 15px;
}

.author-handle-text {
  font-size: 13px;
  color: var(--text-subtle);
}

.btn-follow {
  background: var(--bg-secondary);
  color: var(--text-main);
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-follow:hover {
  background: var(--bg-hover);
}

/* Comments section */
.comments-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.comments-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.comment-item {
  display: flex;
  gap: 10px;
  font-size: 14px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-main);
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
}

.comment-user {
  font-weight: 600;
  margin-left: 6px;
}

.comment-text {
  color: var(--text-main);
  line-height: 1.4;
  margin-top: 2px;
}

.comment-time {
  font-size: 11px;
  color: var(--text-subtle);
  margin-top: 4px;
}

.comment-input-box {
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  padding: 6px 16px;
}

.comment-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14px;
}

.btn-send-comment {
  background: var(--primary);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-send-comment:hover {
  background: var(--primary-hover);
}

/* Upload Pin Modal */
.create-modal-content {
  width: 800px;
  max-width: 95vw;
  padding: 32px;
}

.create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

@media (max-width: 700px) {
  .create-grid {
    grid-template-columns: 1fr;
  }
}

.upload-dropzone {
  border: 2px dashed #d0d0d0;
  border-radius: var(--radius-lg);
  background: #fafafa;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary);
  background: #fff5f5;
}

.upload-dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  font-size: 48px;
  color: var(--text-subtle);
  margin-bottom: 12px;
}

.preview-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-remove-preview {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.btn-remove-preview:hover {
  background: var(--primary);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: white;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--text-main);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
}

/* Boards Grid / Modal */
.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.board-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-secondary);
}

.board-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.board-preview-grid {
  height: 160px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: #e0e0e0;
}

.board-img-main {
  grid-row: span 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.board-img-sub {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.board-card-info {
  padding: 12px 14px;
  background: white;
}

.board-card-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
}

.board-card-count {
  font-size: 13px;
  color: var(--text-subtle);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #111111;
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  animation: toastPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes toastPop {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Empty State & Loading */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-subtle);
}

.empty-state-icon {
  font-size: 56px;
  margin-bottom: 16px;
  color: #ccc;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-secondary);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   Header Dropdown Popovers (Notifications & Messages)
   ========================================== */
.header-dropdown-anchor {
  position: relative;
}

.header-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 360px;
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-color);
  z-index: 150;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-dropdown-menu.open {
  display: flex;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.dropdown-title {
  font-size: 16px;
  font-weight: 700;
}

.dropdown-action-link {
  font-size: 12px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.dropdown-list {
  max-height: 380px;
  overflow-y: auto;
}

.dropdown-item {
  padding: 12px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.dropdown-item:hover {
  background: var(--bg-secondary);
}

.dropdown-item.unread {
  background: #fff8f8;
}

.dropdown-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.dropdown-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
}

.dropdown-time {
  font-size: 11px;
  color: var(--text-subtle);
  margin-top: 3px;
}

/* ==========================================
   Profile Modal & Avatar Upload
   ========================================== */
.profile-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.profile-avatar-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  border: 3px solid white;
}

.profile-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  text-align: center;
  padding: 4px;
  font-size: 11px;
  font-weight: 600;
}

.profile-stats-bar {
  display: flex;
  justify-content: space-around;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.profile-stat-num {
  font-size: 18px;
  font-weight: 700;
}

.profile-stat-label {
  font-size: 12px;
  color: var(--text-subtle);
}

/* ==========================================
   Related Pins Section (In Detail Modal)
   ========================================== */
.related-pins-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.related-pins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.related-pin-card {
  border-radius: 12px;
  overflow: hidden;
  height: 110px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.related-pin-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-pin-card:hover img {
  transform: scale(1.08);
}

.related-pin-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 6px 8px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
   WhatsApp Share Button
   ========================================== */
.btn-whatsapp {
  background: #25d366 !important;
  color: white !important;
}
.btn-whatsapp:hover {
  background: #128c7e !important;
}

/* ==========================================
   Dark Theme
   ========================================== */
body.dark-theme {
  --bg-color: #121212;
  --bg-card: #1f1f1f;
  --bg-secondary: #2a2a2a;
  --bg-hover: #333333;
  --text-main: #f3f3f3;
  --text-muted: #b0b0b0;
  --text-subtle: #8a8a8a;
  --border-color: #2e2e2e;
}

body.dark-theme .app-header {
  background: rgba(18, 18, 18, 0.95);
  border-bottom: 1px solid #282828;
}

body.dark-theme .search-input-wrapper {
  background: #242424;
}
body.dark-theme .search-input-wrapper:focus-within {
  background: #1a1a1a;
  border-color: #555;
}
body.dark-theme .modal-content {
  background: #1e1e1e;
  color: #f3f3f3;
}
body.dark-theme .form-input, 
body.dark-theme .form-textarea, 
body.dark-theme .form-select {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #fff;
}
body.dark-theme .upload-dropzone {
  background: #242424;
  border-color: #444;
}
body.dark-theme .upload-dropzone:hover {
  background: #2c2222;
}
body.dark-theme .board-card-info {
  background: #242424;
}
body.dark-theme .dropdown-item.unread {
  background: #2a1f1f;
}

/* ==========================================
   Gemini AI Smart Vision & Generation Styles
   ========================================== */
.btn-gemini-ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-gemini-ai:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  filter: brightness(1.08);
}

.btn-gemini-ai:active {
  transform: translateY(0);
}

.btn-gemini-ai:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

.btn-gemini-ai .gemini-icon {
  font-size: 17px;
  animation: gemini-sparkle 2s ease-in-out infinite;
}

@keyframes gemini-sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.25) rotate(15deg); }
}

.gemini-ai-status {
  margin-top: 10px;
  padding: 12px 16px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #5b21b6;
  font-weight: 600;
  animation: gemini-pulse 1.8s ease-in-out infinite;
}

body.dark-theme .gemini-ai-status {
  background: #231d3d;
  border-color: #4338ca;
  color: #c4b5fd;
}

@keyframes gemini-pulse {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.65; }
}

.gemini-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(124, 58, 237, 0.2);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.field-ai-highlight {
  animation: field-glow 1.2s ease-out;
}

@keyframes field-glow {
  0% {
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.4);
    border-color: #7c3aed;
  }
  100% {
    box-shadow: none;
  }
}

