/* ==== RESET ==== */
* { margin:0; padding:0; box-sizing:border-box; font-family:"Poppins", sans-serif; }
body { background:#f5f5fb; color:#222; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; line-height:1.5; }

/* ==== HEADER ==== */
.site-header {
  background:#111827;
  color:white;
  box-shadow:0 2px 12px rgba(0,0,0,.15);
  position:sticky;
  top:0;
  z-index:999;
}

/* Hide upload button by default - show only when logged in */
.nav-inner {
  max-width:1200px;
  margin:auto;
  padding:12px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.logo { font-weight:700; font-size:1.5rem; }
.header-center { flex:1; display:flex; justify-content:center; padding:0 12px; }
#search-input {
  width:100%;
  max-width:520px;
  padding:12px 16px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.2);
  background:rgba(255,255,255,.1);
  color:white;
  font-size:1rem;
}

/* ==== HERO ==== */
.hero {
  background:linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), url("https://images.unsplash.com/photo-1507842217343-583bb7270b66") center/cover no-repeat;
  padding:100px 20px;
  color:white;
  text-align:center;
  margin-bottom:30px;
}
.hero-inner h1 { font-size:2.6rem; margin-bottom:15px; font-weight:700; }
.hero-inner p { font-size:1.2rem; color:#f3f3f3; }

/* Landing page upload button styling */
#landing-upload-btn {
  background: linear-gradient(135deg, #ffc107, #ffce3a);
  border: none;
  color: #111827;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255,193,7,0.4);
}

#landing-upload-btn:hover {
  background: linear-gradient(135deg, #e0b106, #ffbf00);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255,193,7,0.6);
}

#landing-upload-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(255,193,7,0.5);
}

/* ==== LIBRARY ==== */
.library { max-width:1200px; margin:20px auto; padding:20px; }
.tabs {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:25px;
}
.tab {
  padding:12px 18px;
  background:white;
  border:1px solid #ddd;
  cursor:pointer;
  border-radius:10px;
  transition:.2s;
  font-weight:600;
  font-size:1rem;
}
.tab.active {
  background:#ffc107;
  color:#111827;
  box-shadow:0 0 16px rgba(255,193,7,.4);
  transform:translateY(-2px);
}
.content-area { min-height:380px; }
.pane {
  display:none;
  opacity:0;
  pointer-events:none;
  transition:opacity .3s ease;
  /* 3 cards per row on typical desktop widths; wraps to new rows */
  grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));
  gap:20px;
  max-height:70vh;
  overflow-y:auto;
  padding-right:4px; /* space for scrollbar */
}
.pane.active { display:grid; opacity:1; pointer-events:auto; }

/* ==== CARD ==== */
.card {
  background:white;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(0,0,0,.08);
  display:flex;
  flex-direction:column;
  position:relative;
  transition:.3s;
}
.card:hover { transform:translateY(-3px); box-shadow:0 10px 28px rgba(0,0,0,.12); }
.card img { width:100%; height:180px; object-fit:cover; }
.card-body { padding:16px; flex:1; display:flex; flex-direction:column; }
.card .fav {
  position:absolute;
  right:14px;
  top:14px;
  background:rgba(255,255,255,.95);
  border-radius:999px;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.3rem;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(0,0,0,.1);
}
.card .owner-actions { display:flex; gap:10px; margin-top:12px; }

/* excerpt & meta */
.excerpt { margin:8px 0; color:#555; font-size:0.96rem; }
.meta { font-size:.9rem; color:#777; }

/* row-actions */
.row-actions { margin-top:auto; display:flex; justify-content:space-between; align-items:center; gap:10px; }

/* ==== BUTTONS ==== */
.btn {
  border:0;
  border-radius:10px;
  padding:12px 18px;
  cursor:pointer;
  font-weight:600;
  font-size:1rem;
  transition:.2s;
}
.btn.primary { background:#ffc107; color:#111827; }
.btn.primary:hover { background:#e0b106; }
.btn.outline { border:1px solid white; background:transparent; color:white; }
.btn.outline:hover { background:rgba(255,255,255,.2); }
.btn.subtle { background:rgba(255,255,255,.2); color:white; }
.btn.subtle:hover { background:rgba(255,255,255,.3); }
.btn.ghost {
  border:1px solid rgba(255,255,255,0.35);
  background:rgba(255,255,255,0.08);
  color:#fff;
  font-weight:600;
}
.btn.ghost:hover {
  background:rgba(255,255,255,0.18);
  border-color:rgba(255,255,255,0.55);
}
.btn.danger { background:#ef4444; color:white; }
.btn.danger:hover { background:#dc2626; }
.btn.full { width:100%; }

/* Auth-required modal buttons */
#auth-required-register {
  background:#ffc107;
  color:#111827;
  border:none;
}

#auth-required-register:hover {
  background:#e0b106;
}

#auth-required-login {
  border:1px solid #d1d5db !important;
  background:#f9fafb !important;
  color:#111827 !important;
}

#auth-required-login:hover {
  background:#e5e7eb !important;
  border-color:#9ca3af !important;
}

/* ==== WORK CARDS ==== */
.work-card {
  background:#ffffff;
  border:1px solid rgba(17,24,39,0.08);
  border-radius:18px;
  padding:16px;
  margin-bottom:16px;
  box-shadow:0 8px 24px rgba(15,23,42,0.08);
  cursor:pointer;
  transition:transform 0.2s ease, box-shadow 0.2s ease;
}

.work-card:hover {
  transform:translateY(-4px);
  box-shadow:0 16px 30px rgba(15,23,42,0.12);
}

.work-card-inner {
  display:flex;
  gap:16px;
}

.work-card .work-cover {
  width:120px;
  min-height:120px;
  border-radius:16px;
  overflow:hidden;
  background:#f5f5f7;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

.work-card .work-cover img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.work-card-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
}

.work-card-actions .work-card-view-btn {
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #fbbf24 !important;
  background: #fbbf24 !important;
  color: #78350f !important;
  font-weight: 600;
}

/* Main work modal PDF button – make it very visible */
.work-pdf-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #fbbf24 !important;
  color: #78350f !important;
  background: #fbbf24 !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5);
}

.work-pdf-view-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.work-card .work-cover.placeholder span {
  font-size:2.5rem;
  font-weight:700;
  color:#ffc107;
}

.work-meta {
  flex:1;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.work-category-label {
  font-size:0.75rem;
  text-transform:uppercase;
  letter-spacing:0.12em;
  color:#a1a1aa;
}

.work-meta .card-title {
  margin:0;
  font-size:1.2rem;
  color:#0f172a;
}

.work-meta .card-author {
  margin:0;
  color:#6b7280;
  font-weight:500;
}

.work-meta .card-excerpt {
  margin:0;
  color:#4b5563;
  line-height:1.5;
}

.empty-state {
  background:#f9fafb;
  border:1px dashed rgba(17,24,39,0.2);
  border-radius:16px;
  padding:30px;
  text-align:center;
  color:#6b7280;
  font-weight:500;
}

/* ==== UPLOAD ==== */
.upload-section {
  max-width:1200px;
  margin:35px auto;
  background:white;
  padding:30px;
  border-radius:14px;
  box-shadow:0 6px 24px rgba(0,0,0,.08);
}
.upload-form { 
  display: flex; 
  flex-direction: column; 
  gap: 18px; 
  width: 100%;
}

.upload-form .row { 
  display: flex; 
  gap: 18px; 
}

.upload-form input, 
.upload-form textarea, 
.upload-form select {
  padding: 14px 16px;
  border: 2px solid #ffc107;
  border-radius: 10px;
  width: 100%;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  background: #fffef7;
  color: #333;
  box-sizing: border-box;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255,193,7,0.15);
}

.upload-form input::placeholder,
.upload-form textarea::placeholder {
  color: #999;
  font-weight: 400;
}

.upload-form input:focus,
.upload-form textarea:focus,
.upload-form select:focus {
  border-color: #ffc107 !important;
  box-shadow: 0 0 0 3px rgba(255,193,7,0.2), 0 0 10px rgba(255,193,7,0.35);
  outline: none;
  background: #fff;
  transform: translateY(-1px);
}

.upload-form input:hover:not(:focus),
.upload-form textarea:hover:not(:focus),
.upload-form select:hover:not(:focus) {
  border-color: #ffc107;
  background: #fff;
  box-shadow: 0 2px 8px rgba(255,193,7,0.2);
}

.upload-form textarea {
  resize: vertical;
  min-height: 150px;
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
}

/* Center the Save / Cancel row in the edit work modal and avoid full-width buttons */
#edit-modal .upload-form > div {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 260px;
  margin: 0 auto;
}

#edit-modal .upload-form .btn.full {
  width: auto;
  min-width: 140px;
}

.upload-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.upload-form select option {
  background: #fff;
  color: #333;
  padding: 10px;
}

.upload-form input[type="file"] {
  cursor: pointer;
  padding: 12px 16px;
}

.upload-form input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, #ffc107, #ffce3a);
  color: #111827;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-right: 12px;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.upload-form input[type="file"]::file-selector-button:hover {
  background: linear-gradient(135deg, #e0b106, #ffbf00);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255,193,7,0.3);
}

.field-hint {
  font-size: 0.92rem;
  color: #6b7280;
  margin-top: -10px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.form-error {
  display: none;
  color: #ef4444;
  font-weight: 600;
  margin-top: -4px;
  margin-bottom: 12px;
}

.my-works-card {
  max-width: 720px;
}

.my-works-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.my-works-subhead {
  margin: 4px 0 0;
  color: #6b7280;
}

.my-works-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.my-works-list .work-card {
  margin-bottom: 0;
}

#my-works-section .empty-state {
  margin-bottom: 0;
}

/* ==== MODAL ==== */
.modal {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.7);
  display:none;
  justify-content:center;
  align-items:center;
  padding:20px;
  z-index:1000;
  overflow-y:auto;
}
.modal-card {
  background:white;
  padding:30px;
  border-radius:14px;
  width:100%;
  max-width:780px;
  max-height:90vh;
  overflow-y:auto;
  position:relative;
  transition:.3s;
}
.modal-card.small { max-width:450px; }
.modal-card.small-card { max-width:660px; }
.modal-card.profile-card-modal { max-width:520px; }
.modal-close {
  position:absolute;
  right:18px;
  top:18px;
  background:none;
  border:none;
  font-size:26px;
  cursor:pointer;
}

/* ==== CENTER MODAL CONTENT ==== */
.modal .modal-card {
  margin:auto;
}
.modal.show { display:flex; }

/* ==== WORK CONTENT ==== */
#modal .work-cover {
  width:100%;
  height:auto;
  border-radius:12px;
  margin:12px 0;
}

/* Work modal author row – avatar + name, looks like text but clickable */
#modal .work-author {
  margin-top: 4px;
  margin-bottom: 8px;
}

#modal .author-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: #111827;
}

#modal .author-link:hover .author-name-text {
  color: #f59e0b;
}

#modal .author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  overflow: hidden;
  border: 3px solid #ffc107;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef9c3;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  flex-shrink: 0;
}

#modal .author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#modal .author-avatar-initials {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}

#modal .author-name-text {
  font-weight: 600;
  color: #111827;
}

.work-pdf-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #fbbf24;
  color: #92400e;
  background: #fffbeb;
  box-shadow: 0 2px 6px rgba(251, 191, 36, 0.35);
}

.work-pdf-view-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.work-header-actions {
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  justify-content: flex-end;
}
.work-pdf-frame {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: 12px;
  margin-bottom: 12px;
  background:#f3f4f6;
}
.star-btn { font-size:22px; background:none; border:none; cursor:pointer; }

/* ==== COMMENTS ==== */
.comment-list { margin-top:15px; display:flex; flex-direction:column; gap:12px; }
.comment {
  background:#f0f0ff;
  padding:14px;
  border-radius:10px;
  font-size:0.95rem;
}
.comment .who { font-weight:700; }
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.comment-input {
  width:100%;
  min-height:80px;
  padding:12px;
  border-radius:10px;
  border:1px solid #ccc;
  font-size:1rem;
  resize: vertical;
}
.add-comment-btn {
  align-self: flex-start;
}

.rating-section {
  margin-top: 16px;
  margin-bottom: 12px;
}
.star-rating {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.avg-rating {
  margin-top: 4px;
  font-size: 0.9rem;
  color: #555;
}

.author-tools {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

/* ==== PROFILE ==== */

/* ===== SMALL ROUND PROFILE AVATAR ===== */
.avatar-preview,
.public-profile .avatar {
  width: 90px;          /* ⭐ adjust size */
  height: 90px;         /* ⭐ adjust size */
  border-radius: 50%;   /* ⭐ makes the image circular */
  overflow: hidden;
  margin: 0 auto 15px auto; /* center it */
  border: 3px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-preview img,
.public-profile .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;    /* ⭐ makes image look perfect inside the circle */
}

.profile-head {
  display:flex;
  gap:18px;
  align-items:center;
  margin-bottom:18px;
}
.profile-head .avatar {
  width:90px;
  height:90px;
  border-radius:999px;
  background:#eee;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:1.3rem;
  overflow:hidden;
}
.profile-head .avatar img { width:100%; height:100%; object-fit:cover; }
.profile-details { flex:1; display:flex; flex-direction:column; gap:10px; }
.profile-details h2 { font-size:1.4rem; font-weight:700; }
.profile-details p { font-size:1rem; color:#555; }

/* ==== PAGINATION ==== */
.pagination { margin-top:18px; display:flex; gap:10px; justify-content:center; align-items:center; }

/* ==== FOOTER ==== */
.site-footer { text-align:center; padding:30px; margin-top:30px; color:#777; font-size:0.95rem; }

/* ==== RESPONSIVE ==== */
@media (max-width:720px) {
  .nav-inner { flex-direction:column; gap:12px; align-items:stretch; }
  .header-center { order:3; width:100%; }
  .tabs { overflow-x:auto; padding-bottom:8px; }
  .card img { height:180px; }
  .upload-form .row { 
    flex-direction: column; 
    gap: 18px;
  }
  
  #upload-modal .modal-card {
    padding: 25px 20px;
    max-height: 90vh;
  }
  
  .modal-card { padding:25px; }
}

/* ==== ANIMATIONS ==== */
.modal.fade-in { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px);} to { opacity:1; transform:translateY(0);} }

.modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); align-items:center; justify-content:center; z-index:1000; }
.modal.active { display:flex; }
.modal-card { background:#fff; padding:20px; border-radius:8px; max-width:760px; width:90%; max-height:90vh; overflow:auto; }

.modal {
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.5);
  align-items:center;
  justify-content:center;
  z-index:1000;
}

.modal.active {
  display:flex;
}

.modal-card {
  background:white;
  padding:20px;
  border-radius:12px;
  max-width:560px;
  width:90%;
  max-height:90vh;
  overflow:auto;
}

/* ===== FIXED CENTERED MODALS (LOGIN, REGISTER, WORK VIEW) ===== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal.active {
  display: flex;
}

/* Default modal size */
.modal-card {
  background: white;
  border-radius: 14px;
  padding: 25px;
  width: 100%;
  max-width: 480px;         /* ⭐ Normal modals (Login/Register/Profile) */
  max-height: 70vh;         /* ⭐ Not too tall — middle of screen */
  overflow-y: auto;
  position: relative;
  animation: fadeIn .25s ease;
}

/* Make the literary samples (workModal) larger */
#modal .modal-card {
  max-width: 800px;         /* ⭐ Bigger for literary content */
  max-height: 75vh;
}

/* PDF viewer modal */
#pdf-modal .pdf-modal-card {
  max-width: 900px;
  max-height: 90vh;
}

.pdf-modal-frame {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: 12px;
  background: #f3f4f6;
  margin-top: 12px;
}

/* Edit modal size */
#edit-modal .modal-card {
  max-width: 600px;
  max-height: 70vh;
}

/* Upload modal styling */
#upload-modal .modal-card {
  max-width: 650px;
  max-height: 85vh;
  background: #ffffff;
  padding: 35px 28px;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.20);
  animation: registerPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
  position: relative;
}

#upload-modal h3 {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: #111827;
  letter-spacing: -0.5px;
}

#upload-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  color: #555;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
}

#upload-modal .modal-close:hover {
  color: #000;
  background: #f5f5f5;
  transform: scale(1.1) rotate(90deg);
}

#upload-modal .btn.primary.full {
  background: linear-gradient(135deg, #ffc107, #ffce3a);
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  transition: all 0.3s ease;
  color: #111827;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(255,193,7,0.3);
  width: 100%;
}

#upload-modal .btn.primary.full:hover:not(:disabled) {
  background: linear-gradient(135deg, #e0b106, #ffbf00);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,193,7,0.5);
}

#upload-modal .btn.primary.full:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255,193,7,0.4);
}

#upload-modal .btn.primary.full:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ===== PUBLIC PROFILE STYLE ===== */
.public-profile {
  text-align: center;
  padding: 18px 16px 16px;
  color: #111827;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.public-profile .profile-bg {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 10px;
}

/* Public profile hero avatar */
.public-profile .avatar {
  width: 120px;
  height: 120px;
  margin: 6px auto 10px auto;
  border-radius: 999px;
  overflow: hidden;
  border: 3px solid #ffc107;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #fff7cc, #fefce8 45%, #f9fafb 100%);
}

.public-profile .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.profile-fields label {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  font-weight: 600;
}

.profile-fields input,
.profile-fields select,
.profile-fields textarea {
  margin-top: 6px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.author-link {
  background:none;
  border:none;
  padding:0;
  font:inherit;
  color:#2563eb;
  font-weight:600;
  cursor:pointer;
}
.author-link:hover {
  text-decoration:underline;
}

.public-user-works {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  margin-top:12px;
}

.public-profile h3 {
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.public-profile h2 {
  margin: 10px 0 4px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
}

.public-profile > p {
  margin: 0 0 10px;
  color: #4b5563;
  font-size: 0.9rem;
  max-width: 320px;
}

.public-profile .public-info {
  margin-top: 16px;
  text-align: left;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  color: #111827;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f9fafb 0%, #fefce8 100%);
  border: 1px solid rgba(251,191,36,0.25);
  box-shadow: 0 6px 18px rgba(15,23,42,0.08);
}

.public-profile .public-info p {
  margin: 4px 0;
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  align-items: baseline;
  column-gap: 16px;
  border-bottom: 1px dashed rgba(148,163,184,0.5);
  padding-bottom: 2px;
}

.public-profile .public-info p strong {
  color: #6b7280;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.public-profile .public-info span {
  color: #1f2937;
  font-weight: 500;
  text-align: right;
}

/* Slightly tighter modal card for public profile to feel like a centered card */
#public-profile-modal .modal-card {
  max-width: 430px;
  border-radius: 22px;
  padding: 28px 30px 24px;
  box-shadow: 0 18px 45px rgba(15,23,42,0.25);
}

.public-profile hr {
  width: 100%;
  max-width: 380px;
  border: 0;
  height: 1px;
  margin: 18px auto 10px auto;
  background: linear-gradient(to right, transparent, #facc15, transparent);
}

.pub-work-card {
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.pub-work-card img {
  width:56px;
  height:56px;
  border-radius:10px;
  object-fit:cover;
}

.pub-work-card strong {
  display:block;
  color:#111827;
}

.pub-work-card p {
  margin:0;
  color:#6b7280;
  font-size:0.9rem;
}

.pub-work-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15,23,42,0.12);
  border-color: rgba(251,191,36,0.8);
  background:#fffdf5;
}

.pub-work-category {
  text-transform: capitalize;
}
/* ============================================
   ★ PROFESSIONAL LOGIN MODAL STYLING + ANIMATION
   ============================================ */

#login-modal .modal-card {
  background: #ffffff;
  padding: 35px 28px;
  border-radius: 18px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.20);
  animation: loginPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

#login-modal h3 {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: #111827;
  letter-spacing: -0.5px;
}

#login-modal input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1.5px solid #dcdcdc;
  margin-bottom: 14px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fafafa;
  font-family: "Poppins", sans-serif;
}

#login-modal input::placeholder {
  color: #999;
  font-weight: 400;
}

#login-modal input:focus {
  border-color: #ffc107;
  box-shadow: 0 0 0 3px rgba(255,193,7,0.2), 0 0 10px rgba(255,193,7,0.35);
  outline: none;
  background: #fff;
  transform: translateY(-1px);
}

/* ===== ABOUT MODAL ===== */
#about-modal .modal-card.about-card {
  background:#ffffff;
  padding:40px 36px;
  border-radius:20px;
  max-width:560px;
  width:90%;
  box-shadow:0 18px 55px rgba(0,0,0,0.25);
  animation: loginPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  position:relative;
}

.about-content {
  display:flex;
  flex-direction:column;
  gap:18px;
  color:#1f2937;
}

.about-content .eyebrow {
  text-transform:uppercase;
  letter-spacing:3px;
  font-size:0.75rem;
  color:#818cf8;
  font-weight:700;
  margin:0;
}

.about-content h3 {
  font-size:1.9rem;
  margin:0;
  color:#111827;
}

.about-content p {
  margin:0;
  color:#4b5563;
  line-height:1.6;
}

.about-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:16px;
  margin:10px 0 5px;
}

.about-item {
  background:#f8f9ff;
  border:1px solid #e5e7fb;
  border-radius:14px;
  padding:14px 16px;
  box-shadow:0 6px 18px rgba(17,24,39,0.08);
}

.about-item h4 {
  margin:0 0 6px;
  font-size:1.05rem;
  color:#111827;
}

.about-item p {
  margin:0;
  font-size:0.92rem;
}

.about-footer {
  background:#111827;
  color:#f8f9ff;
  padding:18px 20px;
  border-radius:16px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

#about-explore-btn {
  align-self:flex-start;
  padding:12px 26px;
  font-size:1rem;
}

/* Password toggle button */
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 1.1rem;
  color: #666;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  line-height: 1;
  margin: 0;
}

.password-toggle:hover {
  color: #ffc107;
  background: rgba(255,193,7,0.1);
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.9);
  background: rgba(255,193,7,0.2);
}

.password-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,193,7,0.3);
}

.eye-icon {
  display: inline-block;
  user-select: none;
  font-size: 1rem;
  line-height: 1;
}

#login-modal input:hover:not(:focus) {
  border-color: #bbb;
  background: #fff;
}

#login-modal .btn.primary.full {
  background: linear-gradient(135deg, #ffc107, #ffce3a);
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  transition: all 0.3s ease;
  color: #111827;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(255,193,7,0.3);
}

#login-modal .btn.primary.full:hover:not(:disabled) {
  background: linear-gradient(135deg, #e0b106, #ffbf00);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,193,7,0.5);
}

#login-modal .btn.primary.full:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255,193,7,0.4);
}

#login-modal .btn.primary.full:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Close button */
#login-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  color: #555;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#login-modal .modal-close:hover {
  color: #000;
  background: #f5f5f5;
  transform: scale(1.1) rotate(90deg);
}

/* Background fade animation */
#login-modal.active {
  animation: fadeBG 0.35s ease forwards;
}

/* Form field spacing improvements */
#login-modal .auth-form {
  margin-top: 8px;
}

#login-modal .auth-form input:last-of-type {
  margin-bottom: 20px;
}

/* ANIMATIONS */
@keyframes loginPop {
  0% { 
    opacity: 0; 
    transform: scale(0.85) translateY(30px); 
  }
  50% { 
    opacity: 0.9; 
    transform: scale(1.02) translateY(-5px); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

@keyframes fadeBG {
  from { background: rgba(0,0,0,0); }
  to { background: rgba(0,0,0,0.6); }
}

/* ============================================
   ★ PROFESSIONAL REGISTER MODAL STYLING + ANIMATION
   ============================================ */

#register-modal .modal-card {
  background: #ffffff;
  padding: 35px 28px;
  border-radius: 18px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.20);
  animation: registerPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

#register-modal h3 {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: #111827;
  letter-spacing: -0.5px;
}

/* Base styles for all register inputs */
#register-modal input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid #ffc107;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fffef7;
  font-family: "Poppins", sans-serif;
  box-shadow: 0 2px 4px rgba(255,193,7,0.15);
  color: #333;
  box-sizing: border-box;
  margin: 0;
}

#register-modal input::placeholder {
  color: #999;
  font-weight: 400;
}

/* Text and email inputs */
#register-modal input[type="text"],
#register-modal input[type="email"] {
  border: 2px solid #ffc107 !important;
  background: #fffef7;
  padding-right: 16px;
  margin-bottom: 14px;
}

/* Password input */
#register-modal input[type="password"],
#register-modal input[type="text"][id*="password"] {
  border: 2px solid #ffc107 !important;
  background: #fffef7;
  padding-right: 50px;
  margin-bottom: 0;
}

#register-modal input:focus {
  border-color: #ffc107 !important;
  box-shadow: 0 0 0 3px rgba(255,193,7,0.2), 0 0 10px rgba(255,193,7,0.35);
  outline: none;
  background: #fff;
  transform: translateY(-1px);
}

/* Password input wrapper for toggle button */
#login-modal .auth-form > div[style*="position: relative"],
#register-modal .auth-form > div[style*="position: relative"] {
  margin-bottom: 14px;
  position: relative;
  width: 100%;
  display: block;
}

#login-modal input[type="password"],
#login-modal input[type="text"] {
  padding-right: 50px !important;
  width: 100%;
  margin-bottom: 0 !important;
  box-sizing: border-box;
}

/* Register form alignment fixes */
#register-modal .auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  align-items: stretch;
}

#register-modal .auth-form input {
  width: 100%;
  box-sizing: border-box;
  display: block;
}

#register-modal .auth-form > div {
  width: 100%;
  box-sizing: border-box;
  display: block;
  position: relative;
  margin-bottom: 14px;
}

#register-modal input:hover:not(:focus) {
  border-color: #ffc107;
  background: #fff;
  box-shadow: 0 2px 8px rgba(255,193,7,0.2);
}

#register-modal .btn.primary.full {
  background: linear-gradient(135deg, #ffc107, #ffce3a);
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  transition: all 0.3s ease;
  color: #111827;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(255,193,7,0.3);
}

#register-modal .btn.primary.full:hover:not(:disabled) {
  background: linear-gradient(135deg, #e0b106, #ffbf00);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,193,7,0.5);
}

#register-modal .btn.primary.full:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255,193,7,0.4);
}

#register-modal .btn.primary.full:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Close button */
#register-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  color: #555;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#register-modal .modal-close:hover {
  color: #000;
  background: #f5f5f5;
  transform: scale(1.1) rotate(90deg);
}

/* Background fade animation */
#register-modal.active {
  animation: fadeBG 0.35s ease forwards;
}

/* Form field spacing improvements */
#register-modal .auth-form {
  margin-top: 8px;
}

#register-modal .auth-form button[type="submit"] {
  margin-top: 8px;
}

/* ANIMATIONS */
@keyframes registerPop {
  0% { 
    opacity: 0; 
    transform: scale(0.85) translateY(30px); 
  }
  50% { 
    opacity: 0.9; 
    transform: scale(1.02) translateY(-5px); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

/* ============================================
   ★ FORGOT PASSWORD MODAL STYLING
   ============================================ */

#forgot-password-modal .modal-card {
  background: #ffffff;
  padding: 35px 28px;
  border-radius: 18px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.20);
  animation: forgotPasswordPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

#forgot-password-modal h3 {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
  color: #111827;
  letter-spacing: -0.5px;
}

#forgot-password-modal p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.6;
}

#forgot-password-modal input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1.5px solid #dcdcdc;
  margin-bottom: 14px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fafafa;
  font-family: "Poppins", sans-serif;
}

#forgot-password-modal input::placeholder {
  color: #999;
  font-weight: 400;
}

#forgot-password-modal input:focus {
  border-color: #ffc107;
  box-shadow: 0 0 0 3px rgba(255,193,7,0.2), 0 0 10px rgba(255,193,7,0.35);
  outline: none;
  background: #fff;
  transform: translateY(-1px);
}

#forgot-password-modal input:hover:not(:focus) {
  border-color: #bbb;
  background: #fff;
}

#forgot-password-modal .btn.primary.full {
  background: linear-gradient(135deg, #ffc107, #ffce3a);
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  transition: all 0.3s ease;
  color: #111827;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(255,193,7,0.3);
}

#forgot-password-modal .btn.primary.full:hover:not(:disabled) {
  background: linear-gradient(135deg, #e0b106, #ffbf00);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,193,7,0.5);
}

#forgot-password-modal .btn.primary.full:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#forgot-password-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  color: #555;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#forgot-password-modal .modal-close:hover {
  color: #000;
  background: #f5f5f5;
  transform: scale(1.1) rotate(90deg);
}

#forgot-password-modal.active {
  animation: fadeBG 0.35s ease forwards;
}

#forgot-password-modal #back-to-login {
  color: #ffc107;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

#forgot-password-modal #back-to-login:hover {
  color: #e0b106;
  text-decoration: underline;
}

#login-modal #forgot-password-link {
  color: #ffc107;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

#login-modal #forgot-password-link:hover {
  color: #e0b106;
  text-decoration: underline;
}

@keyframes forgotPasswordPop {
  0% { 
    opacity: 0; 
    transform: scale(0.85) translateY(30px); 
  }
  50% { 
    opacity: 0.9; 
    transform: scale(1.02) translateY(-5px); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

/* Auth form styling */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.auth-form input {
  margin-bottom: 14px;
}

.auth-form input:last-of-type {
  margin-bottom: 20px;
}

/* Error and success messages */
.error-message {
  animation: slideIn 0.3s ease;
}

.success-message {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   ★ MODERN PROFILE MODAL STYLING + ANIMATION
   ============================================ */

/* Modal Card - Modern Design */
#profile-modal .modal-card {
  max-width: 520px;
  max-height: 90vh;
  padding: 35px 28px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0,0,0,0.20);
  animation: registerPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
  position: relative;
  overflow-y: auto;
}

/* Smooth pop animation matching login/register */
@keyframes profilePop {
  0% { 
    opacity: 0; 
    transform: scale(0.85) translateY(30px); 
  }
  50% { 
    opacity: 0.9; 
    transform: scale(1.02) translateY(-5px); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

/* Profile Modal Title */
#profile-modal h3 {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 25px;
  color: #111827;
  letter-spacing: -0.5px;
}

/* Center header avatar - Enhanced */
.avatar-preview {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: visible;
  border: 4px dashed #ffc107;
  margin: 0 auto 24px auto;
  box-shadow: 0 8px 20px rgba(255,193,7,0.25);
  transition: all 0.3s ease;
  position: relative;
  background: linear-gradient(135deg, #fffef7 0%, #fff9e6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.avatar-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(255,193,7,0.4);
  border-color: #ffc107;
  border-style: solid;
  background: linear-gradient(135deg, #fff 0%, #fffef7 100%);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.avatar-preview:hover img {
  transform: scale(1.05);
}

/* Avatar Placeholder Styling */
.avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  text-align: center;
}

.avatar-placeholder svg {
  margin-bottom: 8px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.avatar-preview:hover .avatar-placeholder svg {
  opacity: 1;
  transform: scale(1.1);
}

.upload-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffc107;
  letter-spacing: 0.3px;
  margin-top: 4px;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.avatar-preview:hover .upload-text {
  color: #e0b106;
  transform: translateY(-2px);
}

/* Avatar input label */
.profile-fields label:has(#avatar-input) {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
  color: #666;
  font-size: 0.9rem;
}

.profile-fields input[type="file"] {
  padding: 12px 16px;
  border: 2px solid #ffc107;
  border-radius: 10px;
  background: #fffef7;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255,193,7,0.15);
  font-family: "Poppins", sans-serif;
}

.profile-fields input[type="file"]:hover {
  border-color: #ffc107;
  background: #fff;
  box-shadow: 0 2px 8px rgba(255,193,7,0.2);
}

.profile-fields input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, #ffc107, #ffce3a);
  color: #111827;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-right: 12px;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.profile-fields input[type="file"]::file-selector-button:hover {
  background: linear-gradient(135deg, #e0b106, #ffbf00);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255,193,7,0.3);
}

/* Field Labels - Enhanced */
.profile-fields label {
  display: block;
  font-weight: 600;
  color: #111827;
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  letter-spacing: -0.2px;
}

.profile-fields label.label-avatar {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-fields label:first-of-type {
  margin-top: 0;
}

/* Input + Select + Textarea - Matching Website Design */
.profile-fields input,
.profile-fields textarea,
.profile-fields select {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid #ffc107;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: #fffef7;
  font-family: "Poppins", sans-serif;
  color: #333;
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgba(255,193,7,0.15);
}

.profile-fields input::placeholder,
.profile-fields textarea::placeholder {
  color: #999;
  font-weight: 400;
}

.profile-fields input:hover:not(:focus),
.profile-fields textarea:hover:not(:focus),
.profile-fields select:hover:not(:focus) {
  border-color: #ffc107;
  background: #fff;
  box-shadow: 0 2px 8px rgba(255,193,7,0.2);
}

.profile-fields input:focus,
.profile-fields textarea:focus,
.profile-fields select:focus {
  border-color: #ffc107 !important;
  box-shadow: 0 0 0 3px rgba(255,193,7,0.2), 0 0 10px rgba(255,193,7,0.35);
  background: #fff;
  outline: none;
  transform: translateY(-1px);
}

.profile-fields textarea {
  min-height: 100px;
  resize: vertical;
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  border: 2px solid #ffc107;
  background: #fffef7;
  box-shadow: 0 2px 4px rgba(255,193,7,0.15);
}

/* Make visibility selects inline - Enhanced */
.visibility-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.visibility-row input {
  flex: 1;
  border: 2px solid #ffc107;
  background: #fffef7;
  box-shadow: 0 2px 4px rgba(255,193,7,0.15);
}

.visibility-row select {
  width: 140px;
  flex-shrink: 0;
  padding: 12px 14px;
  font-weight: 500;
  border: 2px solid #ffc107;
  background: #fffef7;
  box-shadow: 0 2px 4px rgba(255,193,7,0.15);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 35px;
  cursor: pointer;
}

.visibility-row select:hover {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(255,193,7,0.2);
}

.visibility-row select:focus {
  border-color: #ffc107 !important;
  box-shadow: 0 0 0 3px rgba(255,193,7,0.2), 0 0 10px rgba(255,193,7,0.35);
  background-color: #fff;
  outline: none;
}

/* Button Improvements - Modern Gradient */
#save-profile-btn {
  margin-top: 30px;
  font-size: 1.1rem;
  padding: 16px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffc107, #ffce3a);
  border: none;
  color: #111827;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255,193,7,0.4);
  cursor: pointer;
  width: 100%;
}

#save-profile-btn:hover {
  background: linear-gradient(135deg, #e0b106, #ffbf00);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,193,7,0.5);
}

#save-profile-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255,193,7,0.4);
}

/* Logout Button - Enhanced */
#logout-btn {
  margin-top: 12px;
  padding: 14px 24px;
  font-size: 1.05rem;
  border-radius: 12px;
  background: #ef4444;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
  border: none;
  cursor: pointer;
  width: 100%;
}

#logout-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(239,68,68,0.4);
}

#logout-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

/* Divider styling - Enhanced */
#profile-modal hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, #e5e5e5, transparent);
  margin: 28px 0;
}

/* Close button - Matching login/register */
#profile-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  color: #555;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#profile-modal .modal-close:hover {
  color: #000;
  background: #f5f5f5;
  transform: scale(1.1) rotate(90deg);
}

/* Background fade animation */
#profile-modal.active {
  animation: fadeBG 0.35s ease forwards;
}

/* Profile card container */
.profile-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.profile-card .profile-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-card .profile-header {
  text-align: center;
  margin-bottom: 8px;
}

.profile-card .profile-header h3 {
  margin: 8px 0 2px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}

.profile-card .profile-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

/* Loading state */
#profile-body p {
  text-align: center;
  color: #666;
  padding: 20px;
  font-size: 1rem;
}

/* Modal fade animations */
#modal {
  opacity: 0;
  transition: opacity .3s ease;
}

#modal.active {
  opacity: 1;
}
