/* ========== MODERN SLEEK UI DESIGN ========== */

/* Root Variables */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --dark-bg: #0f172a;
  --card-bg: #1e293b;
  --border-color: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1a2332 100%);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  zoom: 80%;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  position: relative;
  z-index: 1;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

a:hover {
  color: var(--secondary);
  text-decoration: none;
}

/* Header */
header {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid transparent;
  background-clip: padding-box;
}

.scrotchLogo {
  height: 60px;
  width: auto;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scrotchLogo:hover {
  transform: scale(1.08) rotate(5deg);
  filter: drop-shadow(0 0 15px var(--primary));
}

/* Search Bar */
.search-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  padding: 0.4rem 0.75rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  width: 300px;
  height: 40px;
}

.search-bar:focus-within {
  border-color: var(--primary-light);
  background: rgba(30, 41, 59, 0.7);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
  width: 300px;
  height: 40px;
}

.search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  margin-right: 0.5rem;
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.search-bar:focus-within .search-icon {
  color: var(--primary-light);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 400;
  min-width: 0;
}

.search-input::placeholder {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 350px;
  max-width: 450px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  max-height: 450px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  z-index: 1001;
}

.search-results.active {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateX(5px);
}

.search-result-thumb {
  width: 50px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 0.75rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  flex-shrink: 0;
}

.search-result-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.search-result-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.search-result-author {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-author img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-views {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.search-loading {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .search-container {
    display: none;
  }
}

/* Profile Picture */
.pfp {
  width: 45px !important;
  height: 45px !important;
  border: 2px solid var(--primary-light) !important;
  border-radius: 50% !important;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.3s ease !important;
}

.pfp:hover {
  transform: scale(1.15);
  box-shadow: 0 0 20px var(--primary);
  border-color: var(--secondary) !important;
}

header .pfp {
  position: relative;
  right: 0;
  top: 0;
}

/* Navigation */
nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  position: relative;
  margin-left: auto;
}

nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0.75rem;
  transition: color 0.3s ease;
}

nav a .badge {
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.3rem;
  font-weight: 600;
  vertical-align: middle;
  animation: pulse 2s infinite;
}

.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.45rem;
  border-radius: 12px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.6);
  }
}

.notification-link {
  font-size: 1.3rem !important;
  padding: 0.25rem 0.5rem !important;
}

.notification-link:hover {
  transform: scale(1.1);
}

.notification-link::after {
  display: none !important;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

nav a:hover {
  color: var(--primary-light);
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  bottom: -5px;
  left: 50%;
  transition: all 0.3s ease;
}

nav a:hover::after {
  width: 100%;
  left: 0;
}

/* Forms */
form {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  margin-top: 100px;
  position: relative;
  z-index: 2;
}

input,
textarea {
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  margin: 10px 0;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  font-family: inherit;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-tertiary);
}


input::file-selector-button {
  background: var(--primary);
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-right: 10px;
}

input::file-selector-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Buttons */
button {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  transition: left 0.3s ease;
  z-index: -1;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

button:active {
  transform: translateY(-1px);
}

/* Login Form */
#login {
  margin-top: 80px;
}

/* Preview Container */
#previewContainer {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 1.5rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2rem 1rem;
  margin: 2rem 0;
  scroll-behavior: smooth;
  position: relative;
  z-index: 2;
}

#previewContainer::-webkit-scrollbar {
  height: 8px;
}

#previewContainer::-webkit-scrollbar-track {
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md);
}

#previewContainer::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: var(--radius-md);
}

#previewContainer::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Article Preview Card */
#articlepreview {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  width: 280px;
  min-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

#articlepreview:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary-light);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.2);
  background: rgba(30, 41, 59, 0.9);
}

#articlepreview h2 {
  font-size: 1.3rem;
  color: var(--primary-light);
  margin-bottom: 1rem;
  margin-top: 0;
  line-height: 1.4;
}

#articlepreview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

#articlepreview:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

#articlepreview p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

#articlepreview a {
  color: var(--primary-light);
}

/* Profile Preview */
.profilepreview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 1rem;
  padding: 10px 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  cursor: pointer;
}

.profilepreview:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary-light);
  transform: translateX(4px);
}

.profilepreview .pfp {
  width: 36px;
  height: 36px;
  object-fit: cover;
  margin-top: 0;
}

.profilepreview .displaynamethingy {
  font-size: 0.95rem;
  color: var(--primary-light);
  margin: 0;
  font-weight: 500;
}

.profilepreview .createdon {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin: 0;
}

/* Profile Page Styles */
.profile-section {
  width: 90%;
  max-width: 1200px;
  margin: 120px auto 2rem;
  position: relative;
  z-index: 1;
}

.profile-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.profile-avatar img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
  object-fit: cover;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-stats {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.stat-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.stat-display {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
}

.stat-label {
  color: var(--text-tertiary);
  font-weight: 500;
}

.stat-value {
  color: var(--text-primary);
  font-weight: 600;
}

.profile-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 1rem;
  font-size: 1rem;
}

/* User Info */
#userInfo {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 600px;
  margin: 150px auto 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

#userInfo h1 {
  font-size: 2.5rem;
  color: var(--primary-light);
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#userInfo .pfp {
  width: 150px;
  height: 150px;
  margin-bottom: 2rem;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

#userInfo p {
  font-size: 1rem;
  margin: 10px 0;
  color: var(--text-secondary);
}

.pencil {
  position: absolute;
  top: 20px;
  right: 20px;
}

.pencil a {
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pencil a:hover {
  transform: scale(1.2) rotate(15deg);
}

/* Experience Bar */
.exp-bar {
  width: 100%;
  background-color: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 8px;
  margin: 1rem 0;
}

.exp-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  transition: width 0.5s ease;
  box-shadow: 0 0 15px var(--primary);
}

/* Heading */
h2 {
  font-size: 2rem;
  margin: 2rem 0 1rem;
  text-align: center;
  color: var(--text-primary);
}

#space {
  margin-top: 3rem;
}

h3 {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Footer */
footer {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem;
  width: 100%;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  margin-top: auto;
  position: relative;
  z-index: 1;
}

footer a {
  color: var(--primary-light);
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--secondary);
}

/* Sitelock Badge */
.sitelock-badge {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sitelock-badge a {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
}

.sitelock-shield {
  max-width: 120px;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.sitelock-shield:hover {
  transform: scale(1.05);
}

/* Project grids */
.section-heading {
  width: 100%;
  max-width: 1200px;
  margin: 2.5rem auto 1rem;
  padding: 0 1rem;
  font-size: 1.75rem;
}

.project-grid {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
  /* Scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
}

.project-grid::-webkit-scrollbar {
  height: 8px;
}

.project-grid::-webkit-scrollbar-track {
  background: transparent;
}

.project-grid::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

.project-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.project-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  flex-shrink: 0;
  min-width: 260px;
  width: 260px;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
}

.delete-form {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.project-thumb {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.03);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.05);
}

.project-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  line-height: 1.3;
  text-decoration: none;
}

.project-title:hover {
  color: var(--primary-light);
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.project-author {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.project-author .pfp {
  width: 38px !important;
  height: 38px !important;
  border-width: 1px !important;
}

.meta-name {
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.meta-date {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  display: block;
}

.project-views {
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Menu (Mobile) */
.menu {
  display: none; /* hidden on desktop; shown via media query on mobile */
  flex-direction: row;
  list-style-type: none;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.menu > li {
  margin: 0;
  overflow: hidden;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.menu > li:hover {
  color: var(--primary-light);
}

.menu-button-container {
  display: none;
  height: 100%;
  width: 30px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 20px;
  top: 15px;
}

#menu-toggle {
  display: none;
}

.menu-button,
.menu-button::after,
.menu-button::before {
  display: block;
  background-color: var(--text-primary);
  position: absolute;
  height: 3px;
  width: 25px;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  border-radius: 2px;
}

.menu-button::before {
  content: '';
  margin-top: -8px;
}

.menu-button::after {
  content: '';
  margin-top: 8px;
}

#menu-toggle:checked + .menu-button-container .menu-button::before {
  margin-top: 0;
  transform: rotate(405deg);
}

#menu-toggle:checked + .menu-button-container .menu-button {
  background: transparent;
}

#menu-toggle:checked + .menu-button-container .menu-button::after {
  margin-top: 0;
  transform: rotate(-405deg);
}

/* Documentation Container */
#documentation-container {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 900px;
  margin: 150px auto;
  color: var(--text-secondary);
  word-wrap: break-word;
  position: relative;
  z-index: 2;
}

#documentation-header h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2rem;
  text-align: center;
}

#documentation-content,
#documentaion-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#documentation-card {
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#documentation-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-light);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15);
  background: rgba(51, 65, 85, 0.8);
}

#documentation-card h2 {
  font-size: 1.5rem;
  color: var(--primary-light);
  margin-bottom: 1rem;
  margin-top: 0;
}

#documentation-card p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.code-block {
  background-color: rgba(15, 23, 42, 0.8);
  color: var(--text-secondary) !important;
  font-family: 'Courier New', Courier, monospace;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  margin-bottom: 1rem;
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Delete Button */
#delete-form {
  background-color: transparent;
  border: none;
  padding: 0;
}

/* Admin Action Buttons Container */
.admin-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 10;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

.project-card:hover .admin-actions {
  opacity: 1;
  transform: translateY(0);
}

/* Feature Button */
.feature-button {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  color: var(--accent);
  transition: all 0.3s ease;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.feature-button:hover {
  color: #ffd700;
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent);
  transform: scale(1.15) rotate(15deg);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Delete Button */
.delete-button {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  color: var(--text-tertiary);
  transition: all 0.3s ease;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.delete-button:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Responsive Design */
@media (max-width: 700px) {
  .menu-button-container {
    display: flex;
  }

  .menu {
    display: flex;
    position: fixed;
    top: 70px;
    left: 0;
    flex-direction: column;
    width: 100%;
    justify-content: center;
    align-items: stretch;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 1px solid var(--border-color);
    gap: 0;
  }

  #menu-toggle:checked ~ .menu {
    max-height: 300px;
  }

  .menu > li {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin: 0;
  }

  #desktop {
    display: none;
  }

  body {
    margin-top: 70px;
  }

  header {
    padding: 1rem;
  }

  form {
    width: 90%;
  }

  #userInfo {
    margin: 100px auto 0;
  }

  #previewContainer {
    flex-wrap: wrap;
    justify-content: center;
  }

  #articlepreview {
    width: 100%;
    min-width: unset;
  }
}

@media (min-width: 701px) {
  .menu-button-container {
    display: none;
  }

  .menu {
    position: static;
    flex-direction: row;
    width: auto;
    max-height: unset;
  }

  .menu li {
    display: flex;
  }

  body {
    margin-top: 80px;
  }

  #desktop {
    display: flex !important;
  }
}

/* ========== ABOUT PAGE ========== */
.about-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 100px auto 50px;
  padding: 3rem;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.about-container h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.freedom-image {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.freedom-image:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
}

.join-image {
  width: 50%;
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.join-image:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
}

.about-container .subtitle {
  text-align: center;
  font-style: italic;
  color: var(--text-tertiary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  letter-spacing: 0.5px;
}

.about-container p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: justify;
  margin-bottom: 1.5rem;
}

/* Responsive Design for About Page */
@media (max-width: 768px) {
  .about-container {
    margin: 80px 20px 30px;
    padding: 2rem 1.5rem;
  }

  .about-container h1 {
    font-size: 2rem;
  }

  .about-container p {
    font-size: 1rem;
    text-align: left;
  }

  .freedom-image {
    max-width: 100%;
  }
}

/* ========== ANNOUNCEMENT PAGE ========== */
.announcement-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 120px auto 50px;
  padding: 3rem;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.announcement-article {
  width: 100%;
}

.announcement-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  line-height: 1.2;
}

.announcement-date {
  color: var(--text-tertiary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.announcement-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), transparent);
  margin-bottom: 2rem;
  border-radius: 2px;
}

.announcement-content {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-top: 2rem;
}

.announcement-content p {
  margin-bottom: 1.2rem;
}

/* Responsive Design for Announcements */
@media (max-width: 768px) {
  .announcement-container {
    margin: 100px 1rem 30px;
    padding: 2rem 1.5rem;
  }

  .announcement-title {
    font-size: 2rem;
  }

  .announcement-content {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .announcement-container {
    margin: 90px 0.5rem 20px;
    padding: 1.5rem 1rem;
  }

  .announcement-title {
    font-size: 1.75rem;
  }

  .announcement-date {
    font-size: 0.9rem;
  }

  .announcement-content {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* Legal Pages */
.legal-container {
  width: min(960px, 92vw);
  margin: 110px auto 40px;
  padding: 2.5rem 2.25rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.legal-container h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.legal-container h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
}

.legal-meta {
  color: var(--text-tertiary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.legal-container ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.legal-container li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.legal-note {
  color: var(--text-tertiary);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .legal-container {
    margin: 100px 1rem 30px;
    padding: 2rem 1.5rem;
  }

  .legal-container h1 {
    font-size: 1.9rem;
  }
}

/* Contact Page */
.contact-container {
  width: min(900px, 92vw);
}

.contact-form {
  width: 100%;
  max-width: none;
  margin-top: 1rem;
  padding: 1.5rem;
  gap: 0.35rem;
}

.contact-form label {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
}

.contact-form select {
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  margin: 10px 0;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  font-family: inherit;
}

.contact-form button {
  margin-top: 1rem;
}

.contact-section {
  display: none;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(99, 102, 241, 0.25);
  padding-top: 0.75rem;
}

.contact-section.is-active {
  display: block;
}

.contact-alert {
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.contact-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  color: #a7f3d0;
}

.contact-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

.contact-error ul {
  margin: 0.5rem 0 0 1.25rem;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .contact-form {
    padding: 1.25rem;
  }
}
