* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-feature-settings: "ss01";
}

body {
  background: linear-gradient(to right, #daece7, #d9ebe6);
  min-height: 100vh;
  padding: 20px;
}

.profile-container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.profile-header {
  background: #359a7e;
  color: white;
  padding: 40px;
  text-align: center;
  position: relative;
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid #2657a4;
  margin: 0 auto 20px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-image .default-avatar {
  color: #2657a4;
}

.profile-image .default-avatar svg {
  height: 7rem;
}

.user-name {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.user-email {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 5px;
}

.user-role {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-top: 10px;
}

.profile-content {
  padding: 40px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
}

.sidebar {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 15px;
}

.info-item {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.info-label {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 5px;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-haghighi {
  background: #e3f2fd;
  color: #2657a4;
}

.badge-hoghooghi {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-admin {
  background: #fff3e0;
  color: #f57c00;
}

.badge-user {
  background: #f5f5f5;
  color: #616161;
}

.stats-flex {
  display: flex;
  margin-top: 20px;
  flex-direction: row;
  align-content: center;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.stat-card {
  background: white;
  padding: 1rem;
  margin: 1rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #2657a4;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
}

.main-content {
  padding: 10px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: #333;
  padding-bottom: 10px;
  border-bottom: 2px solid #2657a4;
}

.catalogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.catalog-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #eee;
  height: 100%;
  display: flex;
  flex-direction: column;
  width: 340px;
  margin: 1rem;
}

.catalog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.catalog-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 340px;
  height: 495px;
}

.catalog-preview img {
  position: absolute;
  width: 100%;
  max-width: none;
}

.catalog-preview .no-preview {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;

  color: #999;
  font-size: 14px;

  height: 100%;
}

.catalog-info {
  padding: 15px;
}

.catalog-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  align-content: center;
  justify-content: space-between;

  font-size: 0.85rem;
  color: #666;
}

.language-flag {
  display: flex;
}

.language-flag img {
  height: 2rem;
}

.catalog-info-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: space-between;
  align-items: center;
}

.catalog-type {
  background: #e3f2fd;
  padding: 2px 8px;
  border-radius: 10px;
  color: #2657a4;
  font-weight: 500;
  margin: 0.3rem;
}

.catalog-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-public {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-private {
  background: #ffebee;
  color: #c62828;
}

.catalog-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.btn {
  padding: 8px 15px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-view {
  background: #2657a4;
  color: white;
  flex: 1;
  margin-right: 5px;
}

.btn-view:hover {
  background: #5a6fd8;
}

.btn-edit {
  background: #f0f0f0;
  color: #333;
  flex: 1;
  margin-left: 5px;
}

.btn-edit:hover {
  background: #e0e0e0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state i {
  font-size: 60px;
  color: #ddd;
  margin-bottom: 20px;
}

.empty-state p {
  font-size: 1.1rem;
  margin-top: 10px;
}

.back-button {
  position: absolute;

  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;

  top: 20px;
  left: 20px;
}

.back-button a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.back-button svg {
  width: 2rem;
}

.back-button img {
  height: 3rem;
}

/* استایل‌های صفحه‌بندی */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #495057;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.page-link:hover:not(.disabled):not(.active) {
  background: #2657a4;
  color: white;
  border-color: #2657a4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.page-link.active {
  background: #2657a4;
  color: white;
  border-color: #2657a4;
  font-weight: bold;
  transform: scale(1.05);
}

.page-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
}

.page-link.disabled:hover {
  transform: none;
  background: #f5f5f5;
  color: #495057;
  border-color: #e9ecef;
  box-shadow: none;
}

.page-numbers {
  display: flex;
  gap: 4px;
  align-items: center;
}

.page-dots {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #999;
  font-size: 1.2rem;
}

.page-jump-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.page-input {
  width: 70px;
  padding: 10px 12px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 0.95rem;
  text-align: center;
  transition: border-color 0.2s;
}

.page-input:focus {
  outline: none;
  border-color: #2657a4;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.page-go-btn {
  padding: 10px 16px;
  background: #2657a4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  font-weight: 500;
}

.viewing-mode-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 4px 8px;
  background-color: #e3f2fd;
  color: #1976d2;
  border-radius: 4px;
  font-size: 12px;
  vertical-align: middle;
  border: 1px solid #bbdefb;
}

.viewing-mode-badge i {
  margin-right: 4px;
}

.catalog-status.status-private-special {
  background-color: #fff3e0;
  color: #ef6c00;
  border: 1px dashed #ffb74d;
}

.private-access-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 152, 0, 0.9);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  z-index: 1;
}

.private-doc-card {
  position: relative;
  border-left: 3px solid #ff9800;
}

.private-doc-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 152, 0, 0.05) 0%,
    rgba(255, 152, 0, 0.02) 100%
  );
  pointer-events: none;
  border-radius: 8px;
}

.access-info {
  background-color: #f5f5f5;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 15px;
  border-left: 4px solid #4caf50;
}

.access-info.admin {
  border-left-color: #2196f3;
}

.access-info.own {
  border-left-color: #ff9800;
}

.language-selector-container {
  position: relative;
}

.custom-select {
  position: relative;
  width: 180px;
  font-family: Arial, sans-serif;
}

.selected-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  transition: all 0.3s;

  margin-top: 1rem;
}

.selected-option:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.selected-option img {
  height: 2.5vh;
  margin-right: 1vh;
  margin-left: 1vh;
}

.selected-option span {
  color: white;
  font-size: 14px;
  font-family: "Vazirmatn";
  font-weight: 500;
  flex: 1;
}

.selected-option i {
  color: white;
  font-size: 12px;
  transition: transform 0.3s;
  margin: 0rem 0.5rem 0rem 0.5rem;
}

.custom-select.active .selected-option i {
  transform: rotate(180deg);
}

.options-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-height: 250px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  margin-top: 5px;
  padding: 0;
}

.options-list li {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;

  font-family: "Vazirmatn";
}

.options-list li:hover {
  background: #f5f5f5;
}

.options-list li img {
  height: 2.5vh;
  border-radius: 2px;
  margin-right: 0.5rem;
  margin-left: 0.5rem;
}

/* استایل برای حالت فعال */
.custom-select.active .options-list {
  display: block;
}

/* استایل بخش کپی رایت */
.copyright-section {
  margin: 25px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  opacity: 0.8;
}

.copyright-text {
  color: #666;
  font-size: 14px;
  margin: 0;
  text-align: center;
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .copyright-text {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .copyright-text {
    font-size: 12px;
    line-height: 1.4;
  }
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .custom-select {
    display: flex;
    justify-content: center;
  }
  .back-button {
    position: unset;
    margin-bottom: 2rem;
  }
  .selected-option {
    width: 50%;
  }
  .header-left {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .language-selector-container {
    width: 100%;
  }

  .custom-select {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .pagination-container {
    flex-direction: column;
    gap: 20px;
  }

  .page-link {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }

  .page-input {
    width: 60px;
  }
}

@media (max-width: 480px) {
  .pagination {
    gap: 4px;
  }

  .page-link {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .pagination {
    gap: 4px;
  }

  .page-link {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .page-jump-form {
    flex-direction: column;
    width: 100%;
  }

  .page-input {
    width: 100%;
  }

  .page-go-btn {
    width: 100%;
  }
}

/* استایل برای آیکون‌ها */
.page-link i {
  font-size: 1rem;
}

/* استایل برای دکمه‌های اول و آخر */
.first-page,
.last-page {
  background: #f0f0f0;
}

.prev-page,
.next-page {
  background: #f5f5f5;
}

@media (max-width: 900px) {
  .profile-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .profile-header {
    padding: 30px 20px;
  }

  .profile-content {
    padding: 20px;
  }

  .catalogs-grid {
    grid-template-columns: 1fr;
  }
}
