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

body.dark {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
  color: #f5f5f5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== ENTRANCE PAGE ===== */
.entrance {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
  position: relative;
  overflow: hidden;
}

.entrance::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 95, 162, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  top: -200px;
  right: -200px;
  animation: pulse 4s ease-in-out infinite;
}

.entrance::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -150px;
  left: -150px;
  animation: pulse 5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.5; }
}

.entrance-content {
  text-align: center;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-circle {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #ff5fa2 0%, #ff8fab 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  box-shadow: 0 10px 40px rgba(255, 95, 162, 0.3);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.initial {
  font-size: 48px;
  font-weight: 600;
  color: white;
  font-family: 'Playfair Display', serif;
}

.entrance-title {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #ff8fab 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.entrance-subtitle {
  font-size: 16px;
  color: #a0a0b0;
  margin-bottom: 40px;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.entrance-form {
  max-width: 380px;
  margin: 0 auto;
}

.password-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 16px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.password-input:focus {
  outline: none;
  border-color: #ff5fa2;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 95, 162, 0.1);
}

.password-input::placeholder {
  color: #666;
}

.enter-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #ff5fa2 0%, #ff8fab 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(255, 95, 162, 0.3);
}

.enter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 95, 162, 0.4);
}

.enter-btn:active {
  transform: translateY(0);
}

.entrance-footer {
  margin-top: 40px;
  color: #666;
  font-size: 14px;
  font-weight: 300;
}

/* ===== NAVIGATION ===== */
.navbar {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-small {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #ff5fa2 0%, #ff8fab 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
}

.nav-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: white;
}

.nav-btn {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.logout-btn {
  padding: 10px;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ===== BLOG HEADER ===== */
.blog-header {
  text-align: center;
  margin-bottom: 60px;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(255, 95, 162, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-title {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #ff8fab 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-description {
  font-size: 18px;
  color: #a0a0b0;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* ===== FEED ===== */
.feed {
  width: 100%;
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 16px;
  font-weight: 300;
}

.post {
  margin-bottom: 80px;
  animation: fadeInUp 0.6s ease-out;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

.post img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.post-content {
  padding: 24px;
}

.meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.meta svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.caption {
  font-size: 16px;
  line-height: 1.6;
  color: #e0e0e0;
  font-weight: 400;
}

/* ===== ADMIN PAGE ===== */
.admin-page {
  max-width: 700px;
  margin: 0 auto;
}

.admin-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: white;
}

.admin-subtitle {
  font-size: 16px;
  color: #888;
  margin-bottom: 40px;
  font-weight: 300;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #aaa;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: #ff5fa2;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 95, 162, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-hint {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.image-preview {
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-placeholder {
  text-align: center;
  color: #666;
  padding: 40px;
}

.preview-placeholder svg {
  stroke: #444;
  margin-bottom: 16px;
}

.preview-placeholder p {
  font-size: 14px;
}

.image-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.form-actions {
  margin-top: 32px;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #ff5fa2 0%, #ff8fab 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(255, 95, 162, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 95, 162, 0.4);
}

.btn-secondary {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 12px;
}

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

.output-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.output-section h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: white;
}

.output-instruction {
  font-size: 14px;
  color: #888;
  margin-bottom: 16px;
}

.output-instruction code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  color: #ff8fab;
}

.json-output {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 8px;
  color: #4ade80;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .entrance-title {
    font-size: 36px;
  }
  
  .blog-title {
    font-size: 32px;
  }
  
  .nav-title {
    display: none;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .admin-card {
    padding: 24px;
  }
  
  .container {
    padding: 20px 16px;
  }
  
  .chat-container {
    padding: 20px 16px;
  }
  
  .chat-input {
    font-size: 15px;
  }
}

/* ===== AI CHAT INTERFACE ===== */
.chat-container {
  max-width: 800px;
  margin: 0 auto 30px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #ff8fab;
  font-size: 16px;
  font-weight: 500;
}

.chat-header svg {
  flex-shrink: 0;
}

.chat-form {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.chat-input {
  flex: 1;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.chat-input:focus {
  outline: none;
  border-color: rgba(255, 95, 162, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 95, 162, 0.1);
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.chat-submit {
  padding: 14px 18px;
  background: linear-gradient(135deg, #ff5fa2 0%, #ff8fab 100%);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 95, 162, 0.4);
}

.chat-submit:active {
  transform: translateY(0);
}

/* Loading State */
.chat-loading {
  text-align: center;
  padding: 20px;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  background: #ff8fab;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.chat-loading p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* Error State */
.chat-error {
  padding: 16px;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 10px;
  color: #ff4444;
  font-size: 14px;
}

/* Response */
.chat-response {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border-left: 3px solid #ff5fa2;
}

.chat-question {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.chat-question strong {
  color: #ff8fab;
}

.chat-answer {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  line-height: 1.7;
}

.chat-answer strong {
  color: #ff8fab;
  margin-right: 4px;
}