:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --bg-dark: #0f172a;
  --text-light: #f8fafc;
  --card-bg: #1e293b;
  --accent-color: #10b981;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
}

header {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

/* Hero & Search */
.hero {
  padding: 5rem 0;
  text-align: center;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent),
    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.1), transparent);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.2rem;
  font-weight: 800;
}

.search-box {
  max-width: 650px;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 60px !important;
  padding: 4px 4px 4px 24px !important;
  transition: all 0.3s ease;
  min-height: 56px;
  overflow: hidden;
  box-sizing: border-box;
}

.search-box:focus-within {
  border-color: var(--primary-color) !important;
  background: rgba(30, 41, 59, 0.95) !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Override global input styles for search inputs */
.search-input {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  color: white !important;
  font-size: 1.05rem !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  min-width: 0;
  height: auto !important;
}

.search-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0 2.2rem;
  height: 48px;
  border-radius: 48px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
}

.search-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Post Cards */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.post-card {
  background: var(--card-bg);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #2d3a4f;
}

.card-body {
  padding: 1.5rem;
  flex-grow: 1;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.card-meta {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 0.8rem;
}

.card-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Admin Styles */
.admin-container {
  max-width: 800px;
  margin: 4rem auto;
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 1rem;
}

/* Global input styles - these were conflicting with search bars */
input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f172a;
  color: white;
  margin-bottom: 1.2rem;
}

button.primary {
  background: var(--primary-color);
  color: white;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
}

button.danger {
  background: #ef4444;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .search-box {
    flex-direction: column;
    border-radius: 1rem !important;
    padding: 10px !important;
    min-height: auto;
  }

  .search-input {
    width: 100%;
    padding: 0.8rem 0 !important;
    text-align: center;
  }

  .search-btn {
    margin-top: 8px !important;
    height: 50px;
    width: 100%;
  }
}