/* =============================================
   NewsActu - Modern Dark Premium 2025
   ============================================= */

/* === STAR RATING === */
.star-rating label:hover ~ label,
.star-rating label:hover { color: #fbbf24 !important; }

/* === BASE === */
body {
  background-color: #080d1e;
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(124, 58, 237, 0.15) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(15, 23, 50, 0.5) 0%, transparent 70%);
  background-attachment: fixed;
  color: #e2e8f0;
}

/* === NAVBAR === */
.navbar {
  background: rgba(10, 15, 35, 0.8) !important;
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1) !important;
}

.navbar .menu a {
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: all 0.2s;
}

.navbar .menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f5;
}

/* === LOGIN === */
.login-bg {
  background-color: #080d1e;
  background-image:
    radial-gradient(circle at 25% 35%, rgba(124, 58, 237, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 75% 65%, rgba(6, 182, 212, 0.15) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
}

/* === HERO === */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%; left: -10%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%; right: -10%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

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

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero h1 span {
  background-size: 200% auto;
  animation: gradient-shift 6s ease infinite;
}

/* === GLASS CARDS === */
.card {
  background: rgba(15, 20, 45, 0.7) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.08) !important;
  border-radius: 16px !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card:hover {
  border-color: rgba(124, 58, 237, 0.25) !important;
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(124, 58, 237, 0.06);
}

/* Card image */
.card figure {
  position: relative;
  overflow: hidden;
}

.card figure img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover figure img {
  transform: scale(1.06);
}

.card figure::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(8, 13, 30, 0.9), transparent);
  pointer-events: none;
}

/* === STAT CARDS === */
.stat {
  background: rgba(15, 20, 45, 0.6) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(99, 102, 241, 0.08);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.stat:nth-child(1)::before { background: linear-gradient(90deg, #06b6d4, #3b82f6); }
.stat:nth-child(2)::before { background: linear-gradient(90deg, #22c55e, #10b981); }
.stat:nth-child(3)::before { background: linear-gradient(90deg, #a855f7, #7c3aed); }
.stat:nth-child(4)::before { background: linear-gradient(90deg, #f59e0b, #ef4444); }

/* === BADGES === */
.badge {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-success {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #4ade80 !important;
  border-color: rgba(34, 197, 94, 0.25) !important;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
}

/* === BUTTONS === */
.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.25s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Gradient button shine */
[class*="from-cyan-500"],
[class*="from-violet-500"] {
  position: relative;
  overflow: hidden;
}

[class*="from-cyan-500"]::after,
[class*="from-violet-500"]::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transition: left 0.6s;
}

[class*="from-cyan-500"]:hover::after,
[class*="from-violet-500"]:hover::after {
  left: 120%;
}

/* === TABLES === */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* === INPUTS === */
input, textarea, select {
  transition: all 0.2s !important;
}

input:focus, textarea:focus, select:focus {
  border-color: rgba(124, 58, 237, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1) !important;
}

/* === COLLAPSE / ACCORDION === */
.collapse {
  border-radius: 12px !important;
}

/* === AVATAR RING === */
.avatar .bg-gradient-to-br {
  box-shadow: 0 0 0 2px rgba(12, 15, 26, 1), 0 0 0 3px rgba(124, 58, 237, 0.4);
}

/* === DROPDOWN === */
.dropdown-content {
  background: rgba(12, 18, 42, 0.95) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.12) !important;
  border-radius: 12px !important;
}

/* === QUILL EDITOR === */
#editor-container { font-size: 16px; }

#editor-container .ql-editor {
  min-height: 350px;
  color: #e2e8f0;
  font-size: 16px;
  line-height: 1.8;
  padding: 24px;
}

#editor-container .ql-editor h1,
#editor-container .ql-editor h2,
#editor-container .ql-editor h3 {
  color: #c4b5fd;
  margin-bottom: 12px;
}

#editor-container .ql-editor blockquote {
  border-left: 3px solid #7c3aed;
  padding-left: 16px;
  color: #94a3b8;
  font-style: italic;
}

#editor-container .ql-editor a { color: #c4b5fd; }

#editor-container .ql-editor img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 16px 0;
}

.ql-toolbar.ql-snow {
  background: rgba(20, 24, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-bottom: none !important;
  border-radius: 12px 12px 0 0;
  padding: 10px 12px !important;
}

.ql-container.ql-snow {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 0 12px 12px;
  background: rgba(12, 15, 26, 0.5);
}

.ql-toolbar .ql-stroke { stroke: #64748b !important; }
.ql-toolbar .ql-fill { fill: #64748b !important; }
.ql-toolbar .ql-picker-label { color: #64748b !important; }
.ql-toolbar button:hover .ql-stroke,
.ql-toolbar button.ql-active .ql-stroke { stroke: #c4b5fd !important; }
.ql-toolbar button:hover .ql-fill,
.ql-toolbar button.ql-active .ql-fill { fill: #c4b5fd !important; }
.ql-toolbar .ql-picker-options { background: #141828 !important; border-color: rgba(255,255,255,0.08) !important; border-radius: 8px !important; }
.ql-toolbar .ql-picker-item { color: #94a3b8 !important; }
.ql-toolbar .ql-picker-item:hover { color: #c4b5fd !important; }

/* Quill tooltip (link, video) */
.ql-snow .ql-tooltip {
  background: #1a1e30 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  color: #cbd5e1 !important;
  padding: 8px 14px !important;
  z-index: 9999 !important;
}
.ql-snow .ql-tooltip input[type="text"] {
  background: #0f1220 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px !important;
  color: #e2e8f0 !important;
  padding: 4px 10px !important;
  font-size: 13px !important;
  outline: none !important;
  width: 200px !important;
}
.ql-snow .ql-tooltip input[type="text"]:focus {
  border-color: #7c3aed !important;
}
.ql-snow .ql-tooltip a {
  color: #c4b5fd !important;
}
.ql-snow .ql-tooltip a.ql-action::after,
.ql-snow .ql-tooltip a.ql-remove::after {
  color: #c4b5fd !important;
}
.ql-snow .ql-tooltip a.ql-preview {
  color: #67e8f9 !important;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ql-snow .ql-tooltip::before {
  color: #94a3b8 !important;
}
/* Make sure tooltip is not hidden by overflow */
.ql-container.ql-snow {
  overflow: visible !important;
}

/* === ARTICLE CONTENT === */
.article-content h1 { font-size: 2em; font-weight: 700; margin: 1.2em 0 0.5em; color: #e2e8f0; }
.article-content h2 { font-size: 1.5em; font-weight: 600; margin: 1em 0 0.5em; color: #cbd5e1; }
.article-content h3 { font-size: 1.25em; font-weight: 600; margin: 1em 0 0.5em; color: #94a3b8; }
.article-content p { margin: 0.75em 0; line-height: 1.85; color: #cbd5e1; }
.article-content ul, .article-content ol { margin: 0.75em 0; padding-left: 2em; color: #cbd5e1; }
.article-content li { margin: 0.3em 0; }
.article-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1.5em 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.article-content blockquote {
  border-left: 3px solid #7c3aed;
  padding: 16px 24px;
  margin: 1.5em 0;
  color: #94a3b8;
  font-style: italic;
  background: rgba(124, 58, 237, 0.05);
  border-radius: 0 12px 12px 0;
}
.article-content a { color: #c4b5fd; text-decoration: none; border-bottom: 1px solid rgba(196, 181, 253, 0.3); transition: all 0.2s; }
.article-content a:hover { color: #e2d9fe; border-bottom-color: rgba(196, 181, 253, 0.6); }
.article-content [style*="color: rgb(15, 52, 96)"] { color: #f59e0b !important; }
.article-content [style*="color: rgb(0, 102, 204)"] { color: #f59e0b !important; }
.article-content [style*="color: rgb(0, 0, 255)"] { color: #f59e0b !important; }
.article-content [style*="color: blue"] { color: #f59e0b !important; }
.article-content pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.article-content code {
  background: rgba(124, 58, 237, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
  color: #c4b5fd;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* === LINE CLAMP === */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* === TOAST === */
.toast { animation: toast-in 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px) translateX(20px); }
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

/* === FOOTER === */
footer {
  background: rgba(8, 13, 30, 0.7) !important;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(99, 102, 241, 0.08) !important;
}

/* === SELECTION === */
::selection {
  background: rgba(124, 58, 237, 0.3);
  color: #fff;
}

/* === DIVIDER === */
.divider::before, .divider::after {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* === FILE INPUT === */
.file-input {
  border-radius: 10px;
}
