:root {
  --primary-color: #7b1fa2;
  --secondary-color: #9c27b0;
  --accent-color: #ff6d00;
  --bg-color: #f5f5f7;
  --card-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
}

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

body {
  font-family: "Cairo", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
}

/* ========== Top Bar (Unified) ========== */
.top-bar {
  background: var(--card-bg);
  padding: 10px 48px;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 20px;
}

.search-container {
  flex: 1;
  max-width: 500px;
  margin: 0 auto;
}

.search-bar {
  display: flex;
  align-items: center;
  background: #f0f0f0;
  border-radius: 40px;
  padding: 8px 20px;
  transition: all 0.3s;
}

.search-bar:focus-within {
  background: #e8e8e8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-bar i {
  color: #888;
  margin-right: 10px;
}

.search-bar input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 15px;
  outline: none;
  font-family: "Cairo", sans-serif;
}

.logo h1 {
  font-size: 28px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

.logo p {
  font-size: 12px;
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s;
  cursor: pointer;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links .report-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e53e3e !important;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 7px;
  transition: all 0.3s;
  background: rgba(229, 62, 62, 0.08);
  border: 1px solid rgba(229, 62, 62, 0.2);
  font-size: 0.88rem;
}

.nav-links .report-btn:hover {
  background: rgba(229, 62, 62, 0.15);
  border-color: rgba(229, 62, 62, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.2);
}

.nav-links .report-btn i {
  font-size: 0.95rem;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.auth-buttons {
  display: flex;
  gap: 12px;
}

.btn-login {
  padding: 10px 24px;
  border-radius: 40px;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-login:hover {
  background: var(--primary-color);
  color: white;
}

.btn-register {
  padding: 10px 28px;
  border-radius: 40px;
  border: none;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-register:hover {
  transform: translateY(-2px);
}

/* ========== Hero Section ========== */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, var(--primary-color) 100%);
  color: white;
  padding: 10px 48px;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--accent-color);
}

.hero p {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 32px;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: var(--accent-color);
  border: none;
  padding: 14px 36px;
  border-radius: 50px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-hero-secondary {
  background: transparent;
  border: 2px solid white;
  padding: 14px 36px;
  border-radius: 50px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

/* ========== Main Three-Column Layout ========== */
.main-layout {
  max-width: 1600px;
  margin: 60px auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 32px;
  align-items: start;
}

/* ========== Side Columns (Right & Left) ========== */
.side-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ========== Center Content ========== */
.center-content {
  width: 100%;
}

/* ========== Side Cards ========== */

/* Login Modal */
.preview-overlay {
  background: rgba(0, 0, 0, 0.7);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-prompt {
  background: white;
  padding: 40px;
  border-radius: 28px;
  text-align: center;
  max-width: 400px;
  margin: 20px;
}

.login-prompt i {
  font-size: 60px;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.login-prompt h3 {
  margin-bottom: 16px;
}

.login-prompt-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
}

/* Footer */
.footer {
  background: #1a1a2e;
  color: white;
  padding: 48px;
  text-align: center;
  margin-top: 60px;
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.load-more-btn {
  padding: 12px 32px;
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 40px;
  color: var(--primary-color);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.load-more-btn:hover {
  background: var(--primary-color);
  color: white;
}

/* ========== Container ========== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* ========== Filter Tabs ========== */
.filter-tabs {
  display: flex;
  gap: 20px;
  margin: 30px auto;
  justify-content: center;
  background: white;
  padding: 10px;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  max-width: 400px;
}

.filter-tab {
  padding: 8px 25px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  color: #555;
}

.filter-tab.active {
  background: linear-gradient(135deg, #7b1fa2, #9c27b0);
  color: white;
}

/* ========== Sort Dropdown ========== */
.sort-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.sort-select {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 8px 20px;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.sort-select i {
  color: #7b1fa2;
}

.sort-select select {
  border: none;
  outline: none;
  font-family: "Cairo", sans-serif;
  font-weight: 500;
  color: #555;
  background: transparent;
  cursor: pointer;
}

/* ========== Pinterest Grid ========== */


/* ========== Toast Notification ========== */
.toast-notification {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #4caf50, #8bc34a);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-notification i {
  font-size: 22px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 15px;
  }

  .logo {
    font-size: 24px;
    order: 1;
    flex: 0 0 auto;
  }

  .search-bar {
    flex: 1 1 100%;
    min-width: 100%;
    margin-top: 10px;
  }

  .auth-buttons {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
    gap: 10px;
  }

  .login-btn,
  .register-btn {
    flex: 1;
    padding: 10px 15px;
  }

  .grid {
    columns: 2 150px;
  }

  .container {
    padding: 15px;
  }

  .filter-tabs {
    gap: 10px;
    margin: 20px auto;
  }

  .filter-tab {
    padding: 8px 15px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .navbar {
    flex-direction: column;
    gap: 12px;
    padding: 12px 12px;
  }

  .logo {
    font-size: 20px;
    text-align: center;
    width: 100%;
  }

  .search-bar {
    width: 100%;
    flex: 1 1 100%;
  }

  .search-bar input {
    font-size: 14px;
  }

  .auth-buttons {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .login-btn,
  .register-btn {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
  }

  .grid {
    columns: 1 100%;
  }

  .container {
    padding: 10px;
  }

  .filter-tabs {
    gap: 8px;
    padding: 8px;
    margin: 15px auto;
  }

  .filter-tab {
    padding: 6px 12px;
    font-size: 11px;
  }

  .sort-container {
    margin-bottom: 15px;
  }

  .sort-select {
    padding: 6px 15px;
    font-size: 12px;
  }

  

  
/* ========== Skeleton Loading ========== */
.skeleton-text {
  background: #eee;
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  border-radius: 5px;
  background-size: 200% 100%;
  animation: 1.5s shine-skeleton linear infinite;
  display: inline-block;
  color: transparent !important;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

.skeleton-text.name {
  width: 100px;
  height: 18px;
}
.skeleton-text.role {
  width: 80px;
  height: 14px;
  margin-top: 4px;
}
.skeleton-text.welcome {
  width: 120px;
  height: 32px;
}
.skeleton-text.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

@keyframes shine-skeleton {
  to {
    background-position-x: -200%;
  }
}
}

/* ========== Toast Notifications ========== */
#toast {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999;
}

.toast-message {
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s forwards;
  font-size: 14px;
  min-width: 250px;
}

.toast-message i {
  font-size: 18px;
}

.toast-success i { color: #4caf50; }
.toast-info i { color: #2196f3; }
.toast-warning i { color: #ff9800; }

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

.toast-message.fade-out {
  animation: fadeOutUp 0.5s forwards;
}

@keyframes fadeOutUp {
  to { transform: translateY(-20px); opacity: 0; }
}

/* ========== Empty State ========== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-top: 20px;
}

.empty-state i {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 18px;
}
@media (max-width: 768px) {
  .masonry-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 15px;
  }
  .card-container {
    margin-bottom: 15px;
    width: 100% !important;
  }
}