:root {
  --bg-color: #080c14;
  --panel-bg: rgba(17, 24, 39, 0.6);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  
  --primary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-gradient: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
  --danger-gradient: linear-gradient(135deg, #f857a6 0%, #ff5858 100%);
  
  --primary-color: #00f2fe;
  --primary-hover: #4facfe;
  --success-color: #00b09b;
  --danger-color: #ff5858;
  --dark-accent: #0f172a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Background Aurora Blobs */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  filter: blur(100px);
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float 20s infinite alternate;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vh;
  background: var(--primary-gradient);
  animation-duration: 25s;
}

.blob-2 {
  bottom: -10%;
  right: -10%;
  width: 60vw;
  height: 60vh;
  background: var(--secondary-gradient);
  animation-duration: 30s;
}

.blob-3 {
  top: 40%;
  left: 50%;
  width: 30vw;
  height: 30vh;
  background: var(--success-gradient);
  animation-duration: 18s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(50px, 30px) scale(1.1) rotate(180deg); }
  100% { transform: translate(-30px, -50px) scale(0.9) rotate(360deg); }
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navbar */
header {
  background: rgba(8, 12, 20, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-icon {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo span span {
  font-weight: 300;
}

nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--primary-color);
  background: rgba(0, 242, 254, 0.1);
}

/* Buttons */
.btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #000;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  border: 1px solid var(--panel-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-success {
  background: var(--success-gradient);
  color: #000;
  box-shadow: 0 4px 14px rgba(0, 176, 155, 0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(0, 176, 155, 0.5);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 88, 88, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(255, 88, 88, 0.5);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 12px;
}

/* Main & Sections */
main {
  flex: 1;
  padding-top: 40px;
  padding-bottom: 80px;
}

.hero {
  text-align: center;
  margin-bottom: 50px;
  animation: fadeInDown 0.8s ease;
}

.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 52px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

.content-section {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.content-section.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-icon {
  color: var(--primary-color);
}

/* Search Bar */
.search-bar {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.search-bar i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar input {
  width: 100%;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  padding: 12px 16px 12px 44px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
  background: rgba(17, 24, 39, 0.6);
}

/* Blog Grid & Cards */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

.post-card {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--panel-shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.post-card:hover::before {
  opacity: 1;
}

.post-card-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.post-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  transition: color 0.3s ease;
}

.post-card:hover h3 {
  color: var(--primary-color);
}

.post-card-summary {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.post-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 10px;
}

.post-card-footer i {
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-footer i {
  transform: translateX(4px);
}

/* Spinner / Loading */
.spinner-container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  gap: 16px;
  color: var(--text-muted);
}

.spinner {
  width: 45px;
  height: 45px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Admin Dashboard Elements */
.admin-header-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-title-info h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-subtitle {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 14px;
}

.table-card {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--panel-border);
}

.admin-table th {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  color: var(--text-color);
  font-size: 15px;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.admin-table td .actions {
  display: flex;
  gap: 10px;
}

.btn-table-action {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-table-edit {
  background: rgba(102, 126, 234, 0.15);
  color: #a3b8cc;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.btn-table-edit:hover {
  background: #667eea;
  color: #fff;
}

.btn-table-delete {
  background: rgba(255, 88, 88, 0.15);
  color: #ffa3a3;
  border: 1px solid rgba(255, 88, 88, 0.3);
}

.btn-table-delete:hover {
  background: #ff5858;
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #0f1524;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-large {
  max-width: 800px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

#login-form {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group label i {
  margin-right: 4px;
}

.form-group input, .form-group textarea {
  width: 100%;
  background: #080c14;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--panel-border);
}

/* Post view details */
.post-meta-details {
  padding: 16px 24px 0 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.post-full-content {
  line-height: 1.8;
  font-size: 16px;
  color: #d1d5db;
}

.post-full-content p {
  margin-bottom: 16px;
}

.error-text {
  color: var(--danger-color);
  background: rgba(255, 88, 88, 0.1);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  padding: 16px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 18px;
}

.toast.success {
  border-left: 4px solid var(--success-color);
}

.toast.success .toast-icon {
  color: var(--success-color);
}

.toast.error {
  border-left: 4px solid var(--danger-color);
}

.toast.error .toast-icon {
  color: var(--danger-color);
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--panel-border);
  background: rgba(8, 12, 20, 0.9);
  padding: 30px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.tech-stack-info {
  font-weight: 500;
  color: var(--text-color);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
    gap: 16px;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .search-bar {
    max-width: 100%;
  }
  .admin-header-panel {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
