@import "loader.css";
@import "navbar.css";
@import "team.css";
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: #0a0a0f !important;
  color: #e0e0e0 !important;
  transition: 400ms all;
}

/* --- Animated Background Grid --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(108,92,231,0.03) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(0,184,148,0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6c5ce7, #a29bfe);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5a4bd1, #8b83f7);
}

/* --- Glass Card Style --- */
.glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  position: relative;
}
.glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108,92,231,0.3), transparent);
}

/* --- Buttons --- */
.button1 {
  padding: 0.6em 1.6em;
  border: 1px solid rgba(108,92,231,0.4);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  color: #a29bfe;
  text-align: center;
  transition: all 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}
.button1::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(108,92,231,0.2), transparent);
  transition: left 400ms;
}
.button1:hover::before {
  left: 0;
}
.button1:hover {
  color: #fff;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  border-color: transparent;
  box-shadow: 0 4px 24px rgba(108,92,231,0.35);
  transform: translateY(-1px);
}

.btn-glow {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}
.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
  transition: all 500ms;
  opacity: 0;
}
.btn-glow:hover::after {
  opacity: 1;
  animation: shimmer 1.5s infinite;
}
.btn-glow:hover {
  box-shadow: 0 0 40px rgba(108,92,231,0.5), 0 0 80px rgba(108,92,231,0.15);
  transform: translateY(-3px);
  color: #fff;
}
@keyframes shimmer {
  0% { left: -200%; }
  100% { left: 200%; }
}

/* --- Secondary Button --- */
.btn-outline-glow {
  display: inline-block;
  padding: 10px 28px;
  background: transparent;
  color: #a29bfe;
  border: 1px solid rgba(108,92,231,0.4);
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 350ms;
  font-size: 0.95rem;
}
.btn-outline-glow:hover {
  background: rgba(108,92,231,0.1);
  border-color: #6c5ce7;
  color: #fff;
  box-shadow: 0 0 20px rgba(108,92,231,0.2);
}

/* --- Info Section --- */
.info {
  text-align: center;
  min-height: 91vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px 20px;
}

.red {
  color: #ff6b6b;
}

/* --- Cards --- */
.card {
  background: rgba(255,255,255,0.03) !important;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 20px !important;
  transition: all 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108,92,231,0.2), transparent);
  opacity: 0;
  transition: opacity 400ms;
}
.card:hover::before {
  opacity: 1;
}
.card:hover {
  transform: translateY(-8px);
  border-color: rgba(108,92,231,0.25) !important;
  box-shadow: 0 20px 60px rgba(108,92,231,0.12), 0 0 0 1px rgba(108,92,231,0.1);
}
.card .card-header {
  background: rgba(255,255,255,0.02) !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  padding: 20px 24px;
}
.card .card-body {
  padding: 20px 24px;
}
.card .card-body .card-text {
  color: #999;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 48px 0 32px;
  margin-top: 80px;
  background: rgba(255,255,255,0.015);
  border-top: 1px solid rgba(255,255,255,0.05);
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108,92,231,0.3), transparent);
}
.footer a {
  text-decoration: none;
  color: #a29bfe;
  font-weight: 600;
  transition: all 300ms;
}
.footer a:hover {
  color: #6c5ce7;
  text-shadow: 0 0 20px rgba(108,92,231,0.3);
}
.footer h6 {
  color: #555;
  font-weight: 400;
}

/* --- Copy icon --- */
.fa-copy {
  font-size: 22px;
  cursor: pointer;
  color: #666;
  transition: all 300ms;
  border-radius: 6px;
  padding: 4px;
}
.fa-copy:hover {
  color: #a29bfe;
  background: rgba(108,92,231,0.1);
  transform: scale(1.1);
}

#likeText {
  color: white;
  margin-left: 5px;
}

/* --- Page titles --- */
.page-title {
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe, #00b894);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
  letter-spacing: -0.5px;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* --- Section Headers --- */
.section-subtitle {
  color: #666;
  font-size: 0.95rem;
  margin-top: 8px;
}

/* --- Gradient Divider --- */
.gradient-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108,92,231,0.3), transparent);
  border: none;
  margin: 32px 0;
}

/* --- Form controls --- */
.form-control {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: #e0e0e0 !important;
  border-radius: 12px !important;
  padding: 13px 18px !important;
  transition: all 300ms;
  font-size: 0.95rem;
}
.form-control:focus {
  border-color: #6c5ce7 !important;
  box-shadow: 0 0 0 3px rgba(108,92,231,0.12), 0 0 20px rgba(108,92,231,0.08) !important;
  background: rgba(255,255,255,0.06) !important;
}
.form-control::placeholder {
  color: #555 !important;
}
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* --- Tables --- */
.table-dark {
  background: rgba(255,255,255,0.02) !important;
  border-radius: 16px;
  overflow: hidden;
  border-collapse: separate;
}
.table-dark th, .table-dark td {
  border-color: rgba(255,255,255,0.04) !important;
  padding: 16px 18px !important;
}
.table-dark thead th {
  background: rgba(108,92,231,0.1) !important;
  color: #a29bfe;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.8px;
}
.table-hover tbody tr {
  transition: background 200ms;
}
.table-hover tbody tr:hover {
  background: rgba(108,92,231,0.06) !important;
}

/* --- Alert --- */
.alert-danger {
  background: rgba(255,107,107,0.08) !important;
  border: 1px solid rgba(255,107,107,0.2) !important;
  color: #ff6b6b !important;
  border-radius: 14px !important;
  backdrop-filter: blur(8px);
}

/* --- Select --- */
select.custom-select, select.form-select {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: #e0e0e0 !important;
  border-radius: 12px !important;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 300ms;
}
select.custom-select:focus, select.form-select:focus {
  border-color: #6c5ce7 !important;
  box-shadow: 0 0 0 3px rgba(108,92,231,0.12) !important;
}
select option {
  background: #12121a;
  color: #e0e0e0;
  padding: 8px;
}

/* --- Badges --- */
.badge-glow {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  gap: 4px;
  transition: all 300ms;
}
.badge-glow:hover {
  transform: scale(1.05);
}

/* --- Floating Label Style --- */
.floating-label {
  position: relative;
}
.floating-label label {
  color: #666;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

/* --- Fade up animation --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.fade-up {
  animation: fadeUp 0.6s ease-out forwards;
}
.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}
.scale-in {
  animation: scaleIn 0.4s ease-out forwards;
}

/* --- Stagger animation for lists --- */
.stagger-item {
  opacity: 0;
  animation: fadeUp 0.5s ease-out forwards;
}
.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }
.stagger-item:nth-child(9) { animation-delay: 0.45s; }
.stagger-item:nth-child(10) { animation-delay: 0.5s; }
.stagger-item:nth-child(11) { animation-delay: 0.55s; }
.stagger-item:nth-child(12) { animation-delay: 0.6s; }

/* --- Horizontal rule --- */
hr {
  border-color: rgba(255,255,255,0.06) !important;
  margin: 24px 0;
}

/* --- Light Theme --- */
body.light-theme {
  background-color: #f5f6fa !important;
  color: #1a1a2e !important;
}
body.light-theme::before {
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(108,92,231,0.04) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(0,184,148,0.03) 0%, transparent 50%);
}
body.light-theme .glass {
  background: rgba(255,255,255,0.75);
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
body.light-theme .card {
  background: rgba(255,255,255,0.85) !important;
  border-color: rgba(0,0,0,0.08) !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}
body.light-theme .card:hover {
  border-color: rgba(108,92,231,0.3) !important;
  box-shadow: 0 16px 48px rgba(108,92,231,0.1);
}
body.light-theme .card .card-header {
  background: rgba(0,0,0,0.015) !important;
  border-bottom-color: rgba(0,0,0,0.05) !important;
}
body.light-theme .card .card-body .card-text {
  color: #555;
}
body.light-theme .form-control {
  background: rgba(0,0,0,0.025) !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #1a1a2e !important;
}
body.light-theme .form-control::placeholder {
  color: #aaa !important;
}
body.light-theme .form-control:focus {
  background: #fff !important;
}
body.light-theme .table-dark {
  background: rgba(255,255,255,0.85) !important;
  color: #1a1a2e !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}
body.light-theme .table-dark th,
body.light-theme .table-dark td {
  border-color: rgba(0,0,0,0.06) !important;
  color: #1a1a2e;
}
body.light-theme .table-dark thead th {
  color: #6c5ce7;
  background: rgba(108,92,231,0.06) !important;
}
body.light-theme .table-hover tbody tr:hover {
  background: rgba(108,92,231,0.04) !important;
}
body.light-theme .footer {
  background: rgba(0,0,0,0.015);
  border-top-color: rgba(0,0,0,0.06);
}
body.light-theme .footer h6 {
  color: #888;
}
body.light-theme .navbar {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 12px rgba(0,0,0,0.05);
}
body.light-theme .nav-link,
body.light-theme .deneme.navbar-brand {
  color: #1a1a2e !important;
}
body.light-theme .dropdown-menu {
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
body.light-theme .dropdown-item {
  color: #333;
}
body.light-theme .dropdown-item:hover {
  background: rgba(108,92,231,0.06);
  color: #6c5ce7;
}
body.light-theme select.form-select {
  background: rgba(0,0,0,0.025) !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #1a1a2e !important;
}
body.light-theme select option {
  background: #fff;
  color: #1a1a2e;
}
body.light-theme ::-webkit-scrollbar-track {
  background: #f5f6fa;
}
body.light-theme pre {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}
body.light-theme .page-title {
  background: linear-gradient(135deg, #5a4bd1, #6c5ce7, #00a381);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.light-theme .button1 {
  border-color: rgba(108,92,231,0.3);
}
body.light-theme .stat-card {
  background: rgba(255,255,255,0.8) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
body.light-theme .gradient-divider {
  background: linear-gradient(90deg, transparent, rgba(108,92,231,0.2), transparent);
}

/* --- Focus visible for accessibility --- */
*:focus-visible {
  outline: 2px solid #6c5ce7;
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Code Block Styling --- */
pre {
  background: rgba(0,0,0,0.3) !important;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 20px !important;
  position: relative;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
}
pre::-webkit-scrollbar {
  height: 4px;
}
pre::-webkit-scrollbar-thumb {
  background: rgba(108,92,231,0.3);
  border-radius: 4px;
}
code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}
.inline-code, code:not(pre code) {
  background: rgba(108,92,231,0.12);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.88em;
  color: #c4b5fd;
}

/* --- Modal Styling --- */
.modal-content {
  background: rgba(15,15,25,0.98) !important;
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal-header {
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  padding: 24px 28px !important;
}
.modal-body {
  padding: 24px 28px !important;
}
.modal-footer {
  border-top: 1px solid rgba(255,255,255,0.06) !important;
  padding: 16px 28px !important;
}
body.light-theme .modal-content {
  background: rgba(255,255,255,0.98) !important;
  border-color: rgba(0,0,0,0.1) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.15);
}

/* --- Responsive / Mobile --- */
@media (max-width: 768px) {
  .page-title {
    font-size: 1.7rem;
  }
  .glass {
    padding: 20px !important;
    border-radius: 16px;
  }
  .card {
    max-width: 100% !important;
    border-radius: 16px !important;
  }
  .card:hover {
    transform: translateY(-4px);
  }
  .row-cols-md-4 > .col {
    padding-left: 8px;
    padding-right: 8px;
  }
  .code-actions {
    flex-direction: column;
    gap: 8px;
  }
  pre {
    font-size: 0.8rem;
    padding: 14px !important;
    border-radius: 12px;
  }
  .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .sharer-link {
    font-size: 0.85rem;
    padding: 4px 12px;
  }
  .sharer-avatar {
    width: 28px;
    height: 28px;
  }
  .footer {
    padding: 32px 16px 24px;
    margin-top: 40px;
  }
  .footer > div > div:first-child {
    flex-direction: column;
    text-align: center;
    gap: 24px !important;
  }
  .stat-card {
    padding: 18px !important;
  }
  .stat-card div:first-child {
    font-size: 1.8rem !important;
  }
  .modal-content {
    margin: 10px;
    border-radius: 16px !important;
  }
  .modal-header, .modal-body, .modal-footer {
    padding: 16px 18px !important;
  }
  .btn-glow {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  .button1 {
    padding: 0.5em 1.2em;
    font-size: 0.88rem;
  }
  .info {
    min-height: 70vh;
    padding: 100px 16px 40px;
  }
  .action-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  .empty-state {
    padding: 40px 16px;
  }
  .empty-state i {
    font-size: 2.2rem;
  }
  .profile-avatar {
    width: 80px !important;
    height: 80px !important;
  }
  .rank-badge {
    font-size: 0.6rem;
    padding: 3px 10px;
  }
  .notif-link {
    padding: 12px 14px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .notif-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }
  .top-code-link {
    padding: 10px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .search-input-wrapper input {
    font-size: 0.9rem;
  }
  .badge-glow {
    font-size: 0.7rem;
    padding: 4px 10px;
  }
  .tag-chip {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  /* Table responsive wrapper */
  .table-responsive {
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-dark {
    min-width: 500px;
  }
  /* Pagination */
  .pagination {
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
  }
  .pagination .page-link {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  hr {
    margin: 16px 0;
  }
  select.form-select {
    font-size: 0.88rem;
    padding: 10px 12px;
  }
}

@media (max-width: 576px) {
  .page-title {
    font-size: 1.3rem;
  }
  .section-subtitle {
    font-size: 0.85rem;
  }
  .btn-glow {
    padding: 9px 18px;
    font-size: 0.85rem;
  }
  .card .card-body {
    padding: 12px;
  }
  .card .card-header {
    padding: 12px;
  }
  .card .card-body .card-text {
    font-size: 0.82rem;
  }
  .form-control {
    padding: 10px 12px !important;
    font-size: 0.88rem;
    border-radius: 10px !important;
  }
  .table-dark th, .table-dark td {
    padding: 10px 8px !important;
    font-size: 0.78rem;
  }
  .stat-number {
    font-size: 1.6rem;
  }
  .stat-label {
    font-size: 0.7rem;
  }
  pre {
    font-size: 0.75rem;
    padding: 10px !important;
    border-radius: 10px;
  }
  .floating-label label {
    font-size: 0.72rem;
  }
  .fa-copy {
    font-size: 18px;
  }
  .cat-bar-label {
    font-size: 0.8rem;
  }
  .alert-danger {
    font-size: 0.85rem;
    padding: 12px 14px !important;
    border-radius: 10px !important;
  }
  .stagger-item {
    animation-duration: 0.35s;
  }
}

@media (max-width: 400px) {
  .page-title {
    font-size: 1.15rem;
  }
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .card {
    border-radius: 12px !important;
  }
  .btn-glow {
    padding: 8px 14px;
    font-size: 0.82rem;
    border-radius: 10px;
  }
  .button1 {
    padding: 0.4em 1em;
    font-size: 0.82rem;
    border-radius: 10px;
  }
  .modal-content {
    margin: 6px;
    border-radius: 14px !important;
  }
  .footer {
    padding: 24px 12px 20px;
  }
  .footer a {
    font-size: 0.85rem;
  }
}

/* --- Mobile: fix main container top padding --- */
@media (max-width: 768px) {
  .container[style*="padding-top: 100px"],
  .container[style*="padding-top:100px"],
  div[style*="padding-top: 100px"],
  div[style*="padding-top:100px"] {
    padding-top: 80px !important;
  }
  /* Admin page title size */
  h1[style*="font-size: 2.5rem"],
  h1[style*="font-size:2.5rem"] {
    font-size: 1.8rem !important;
  }
  /* Admin stat numbers */
  div[style*="font-size: 2.5rem"],
  div[style*="font-size:2.5rem"] {
    font-size: 1.8rem !important;
  }
  /* Glass container padding override */
  .glass[style*="padding: 40px"],
  .glass[style*="padding:40px"],
  div[style*="padding: 32px"],
  div[style*="padding:32px"] {
    padding: 20px !important;
  }
  /* Search/filter flex row - force wrap & stack */
  form div[style*="display: flex"][style*="gap: 12px"],
  form div[style*="display:flex"][style*="gap:12px"] {
    flex-wrap: wrap !important;
  }
  form div[style*="display: flex"][style*="gap: 8px"],
  form div[style*="display:flex"][style*="gap:8px"] {
    flex-wrap: wrap !important;
  }
  /* Search filter inputs min-width override */
  form input[style*="min-width: 140px"],
  form input[style*="min-width:140px"],
  form select[style*="min-width: 120px"],
  form select[style*="min-width:120px"] {
    min-width: 100% !important;
    flex: 1 1 100% !important;
  }
  /* File upload zone padding */
  div[style*="padding: 40px 20px"] {
    padding: 24px 16px !important;
  }
  /* Admin table responsive */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 576px) {
  .container[style*="padding-top: 100px"],
  .container[style*="padding-top:100px"],
  div[style*="padding-top: 100px"],
  div[style*="padding-top:100px"] {
    padding-top: 70px !important;
  }
  /* Profile stat cards padding */
  .card[style*="padding: 24px"],
  .card[style*="padding:24px"] {
    padding: 14px !important;
  }
  /* More aggressive form stacking */
  form div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 8px !important;
  }
  form div[style*="display: flex"] .btn-glow {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .container[style*="padding-top: 100px"],
  .container[style*="padding-top:100px"],
  div[style*="padding-top: 100px"],
  div[style*="padding-top:100px"] {
    padding-top: 60px !important;
  }
}

/* --- Rank Badges --- */
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  transition: all 200ms;
}
.rank-badge:hover {
  transform: scale(1.05);
}
.rank-normal { background: rgba(191,225,255,0.12); color: #bfe1ff; border: 1px solid rgba(191,225,255,0.15); }
.rank-gold { background: rgba(241,197,49,0.12); color: #F1C531; border: 1px solid rgba(241,197,49,0.15); }
.rank-diamond { background: rgba(57,152,219,0.12); color: #3998DB; border: 1px solid rgba(57,152,219,0.15); }
.rank-ready { background: rgba(248,0,0,0.1); color: #ff4444; border: 1px solid rgba(248,0,0,0.15); }
.rank-fromyou { background: rgba(108,92,231,0.12); color: #a29bfe; border: 1px solid rgba(108,92,231,0.15); }

/* --- Stat Cards --- */
.stat-card {
  transition: all 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6c5ce7, #a29bfe);
  opacity: 0;
  transition: opacity 400ms;
}
.stat-card:hover::before {
  opacity: 1;
}
.stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(108,92,231,0.25);
  box-shadow: 0 16px 48px rgba(108,92,231,0.12);
}
.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #a29bfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.light-theme .stat-number {
  background: linear-gradient(135deg, #1a1a2e, #6c5ce7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  color: #777;
  font-size: 0.8rem;
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Trending Card --- */
.trending-card {
  max-width: 100% !important;
}

/* --- Toast Notifications --- */
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

/* --- Notification Badge Pulse --- */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 4px rgba(108,92,231,0.3); }
  50% { box-shadow: 0 0 12px rgba(108,92,231,0.5); }
}
#notifBadge {
  animation: pulse 2s ease-in-out infinite;
}
#msgBadge {
  animation: pulse 2.5s ease-in-out infinite;
}

/* --- Bookmark Button --- */
.bookmark-btn {
  transition: all 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.bookmark-btn:hover {
  color: #a29bfe !important;
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(108,92,231,0.3));
}

/* --- Action Buttons (code page) --- */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 300ms;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #b0b0b0;
  cursor: pointer;
  text-decoration: none;
}
.action-btn:hover {
  border-color: rgba(108,92,231,0.3);
  background: rgba(108,92,231,0.08);
  color: #a29bfe;
  transform: translateY(-1px);
}
.action-btn i {
  font-size: 0.9rem;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #555;
}
.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}
.empty-state p {
  font-size: 1rem;
  color: #666;
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Footer links hover --- */
.footer a:hover {
  color: #a29bfe !important;
}

/* --- Light Theme Additions --- */
body.light-theme .stat-card:hover {
  border-color: rgba(108,92,231,0.3);
}
body.light-theme .rank-badge {
  border: 1px solid rgba(0,0,0,0.05);
}
body.light-theme .toast-notification {
  background: rgba(255,255,255,0.95) !important;
  color: #1a1a2e !important;
}

/* --- Category Bar Styles (stats page) --- */
.cat-bar-label {
  font-weight: 600;
  font-size: 0.9rem;
}
.cat-color-normal { color: #bfe1ff; }
.cat-color-gold { color: #F1C531; }
.cat-color-diamond { color: #3998DB; }
.cat-color-ready { color: #f80000; }
.cat-color-fromyou { color: #a29bfe; }

.cat-bar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
}
.cat-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 1s ease;
}
.cat-bg-normal { background: #bfe1ff; }
.cat-bg-gold { background: #F1C531; }
.cat-bg-diamond { background: #3998DB; }
.cat-bg-ready { background: #f80000; }
.cat-bg-fromyou { background: #a29bfe; }

/* --- Top Code Link (stats page) --- */
.top-code-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  margin: 8px 0;
  border-radius: 12px;
  color: #e0e0e0;
  transition: all 200ms;
  border: 1px solid rgba(255,255,255,0.05);
}
.top-code-rank {
  font-size: 1.5rem;
  font-weight: 800;
  min-width: 32px;
  color: #666;
}
.top-code-rank.rank-gold { color: #F1C531; }
.top-code-rank.rank-silver { color: #C0C0C0; }
.top-code-rank.rank-bronze { color: #CD7F32; }

/* --- Notification Link Styles --- */
.notif-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin: 8px 0;
  border-radius: 12px;
  transition: all 200ms;
  border: 1px solid rgba(255,255,255,0.05);
}
.notif-link.notif-unread {
  background: rgba(108,92,231,0.08);
  border-color: rgba(108,92,231,0.2);
}
.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-icon-like {
  background: rgba(255,107,107,0.15);
  color: #ff6b6b;
}
.notif-icon-comment {
  background: rgba(108,92,231,0.15);
  color: #a29bfe;
}
.notif-icon-default {
  background: rgba(0,184,148,0.15);
  color: #00b894;
}

/* --- Profile Card Enhancements --- */
.profile-avatar {
  border: 3px solid rgba(108,92,231,0.4);
  box-shadow: 0 0 24px rgba(108,92,231,0.2);
  transition: all 400ms;
}
.profile-avatar:hover {
  border-color: #6c5ce7;
  box-shadow: 0 0 40px rgba(108,92,231,0.35);
  transform: scale(1.05);
}

/* --- Tag Chips --- */
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(108,92,231,0.08);
  color: #a29bfe;
  border: 1px solid rgba(108,92,231,0.12);
  transition: all 200ms;
}
.tag-chip:hover {
  background: rgba(108,92,231,0.15);
  border-color: rgba(108,92,231,0.25);
}

/* --- Tooltip Enhancement --- */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: rgba(0,0,0,0.9);
  color: #fff;
  font-size: 0.75rem;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms;
}
[data-tooltip]:hover::after {
  opacity: 1;
}

/* --- Progress Ring --- */
.progress-ring {
  background: conic-gradient(#6c5ce7 var(--progress, 0%), rgba(255,255,255,0.06) 0%);
  border-radius: 50%;
  padding: 3px;
}
.progress-ring-inner {
  background: #0a0a0f;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Search Input Enhanced --- */
.search-input-wrapper {
  position: relative;
}
.search-input-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  transition: color 300ms;
}
.search-input-wrapper input {
  padding-left: 44px !important;
}
.search-input-wrapper input:focus + i,
.search-input-wrapper:focus-within i {
  color: #6c5ce7;
}

/* --- Hover Glow Effect --- */
.hover-glow {
  transition: all 350ms;
}
.hover-glow:hover {
  box-shadow: 0 0 30px rgba(108,92,231,0.15);
}

/* --- Scroll Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Section Subtitle --- */
.section-subtitle {
  color: #666;
  font-size: 0.95rem;
  font-weight: 400;
}

/* --- Smooth Scrollbar on containers --- */
.smooth-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(108,92,231,0.3) transparent;
}

/* --- Counter Animation Utility --- */
.counter-animated {
  display: inline-block;
  transition: all 200ms;
}

/* --- Backdrop overlay for modals --- */
.modal-backdrop.show {
  background: rgba(0,0,0,0.6) !important;
  backdrop-filter: blur(4px);
}

/* --- Reaction Buttons --- */
.reaction-btn:hover {
  border-color: rgba(108,92,231,0.4) !important;
  background: rgba(108,92,231,0.1) !important;
  transform: scale(1.05);
}
.reaction-active {
  border-color: rgba(108,92,231,0.5) !important;
  background: rgba(108,92,231,0.15) !important;
}
.btn-dim { opacity: 0.5; }

/* --- Activity Feed --- */
.feed-item {
  transition: background 200ms, border-color 200ms;
}
.feed-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(108,92,231,0.2);
}

/* --- Light theme overrides for new components --- */
body.light-theme .reaction-btn {
  color: #333 !important;
  border-color: rgba(0,0,0,0.1) !important;
  background: rgba(0,0,0,0.03) !important;
}
body.light-theme .reaction-btn:hover,
body.light-theme .reaction-active {
  border-color: rgba(108,92,231,0.4) !important;
  background: rgba(108,92,231,0.1) !important;
}
body.light-theme .feed-item:hover {
  background: rgba(0,0,0,0.03);
}