/* === Base === */
body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  background-attachment: fixed;
  color: #cbd5e1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

p {
  line-height: 1.6;
  color: #94a3b8;
}

/* === Transitions === */
button, a, .card, .btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Glossy Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  border-radius: 0.875rem;
  padding: 0.55rem 1.1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.4), 0 6px 10px -5px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: linear-gradient(145deg, #f87171 0%, #ef4444 45%, #b91c1c 100%);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(145deg, #fca5a5 0%, #f87171 45%, #dc2626 100%);
}

.btn-secondary {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.btn-secondary:hover {
  background: linear-gradient(145deg, rgba(248, 113, 113, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

/* === Dark Glassmorphism Cards === */
.card {
  background: rgba(30, 41, 59, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25), 0 10px 25px -5px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.15), 0 8px 20px -5px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
  border-color: rgba(239, 68, 68, 0.25);
}

/* === Glossy Hero === */
.hero {
  position: relative;
  background: linear-gradient(135deg, #020617 0%, #1e1b4b 25%, #7c3aed 50%, #991b1b 100%);
  color: white;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(220, 38, 38, 0.2), 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(220, 38, 38, 0.25) 0%, transparent 50%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #ffffff 0%, #fecaca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Dark Glossy Forms === */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
textarea,
select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.875rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  width: 100%;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  color: #f1f5f9;
}

input::placeholder, textarea::placeholder {
  color: #64748b;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  background: rgba(15, 23, 42, 0.8);
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12), inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* === Glossy Status badges === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* === Line clamp === */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.glossy-shine {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* === Dark Glossy Admin tables === */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25), 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  background: rgba(30, 41, 59, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table th {
  background: linear-gradient(145deg, rgba(51, 65, 85, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: #cbd5e1;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table td {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(239, 68, 68, 0.08);
}

/* === Footer === */
.site-footer {
  background: rgba(2, 6, 23, 0.7);
  color: #94a3b8;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #f87171;
}

/* === Glossy utility === */
.glossy-icon {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.08) 100%);
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 4px rgba(239, 68, 68, 0.15);
}

/* === Utility for dark text on light elements === */
.text-muted {
  color: #94a3b8;
}

.text-soft {
  color: #cbd5e1;
}

textarea.hidden,
textarea[style*="display: none"] {
  display: none !important;
}

/* === Quill Dark Theme === */
.quill-editor {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  overflow: hidden;
}

.quill-editor .ql-toolbar {
  background: rgba(30, 41, 59, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-left: none;
  border-right: none;
}

.quill-editor .ql-toolbar .ql-stroke,
.quill-editor .ql-toolbar .ql-fill,
.quill-editor .ql-toolbar .ql-picker-label,
.quill-editor .ql-toolbar .ql-picker-item {
  stroke: #cbd5e1;
  fill: #cbd5e1;
  color: #cbd5e1;
}

.quill-editor .ql-toolbar button:hover .ql-stroke,
.quill-editor .ql-toolbar button:hover .ql-fill,
.quill-editor .ql-toolbar button.ql-active .ql-stroke,
.quill-editor .ql-toolbar button.ql-active .ql-fill {
  stroke: #f87171;
  fill: #f87171;
}

.quill-editor .ql-container {
  border: none;
  background: rgba(15, 23, 42, 0.3);
  color: #e2e8f0;
  font-size: 0.95rem;
  min-height: 120px;
}

.quill-editor .ql-editor p {
  color: #e2e8f0;
}

.quill-editor .ql-editor a {
  color: #f87171;
}

.quill-editor .ql-editor blockquote {
  border-left: 4px solid #f87171;
}

.quill-editor .ql-editor.ql-blank::before {
  color: #94a3b8;
}

/* Make rendered HTML from Quill look good in dark cards */
.ql-content p,
.post-content p,
.card p {
  color: #cbd5e1;
}

.ql-content a,
.post-content a {
  color: #f87171;
  text-decoration: underline;
}

.ql-content ul,
.ql-content ol,
.post-content ul,
.post-content ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.ql-content li,
.post-content li {
  margin-bottom: 0.25rem;
}
