/* =============================================
   Obituary Generator – Clean & Modern UI
   ============================================= */

.ogp-wrapper {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  max-width: 960px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 25px 50px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}
.dark .ogp-wrapper {
  background: rgba(20,20,35,0.85);
  border-color: rgba(255,255,255,0.1);
  color: #eee;
}

/* Header */
.ogp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.ogp-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: #1a1a2e;
}
.dark .ogp-title { color: #fff; }
.ogp-description { font-size: 1.1rem; opacity: 0.8; margin: 0; }
.ogp-actions { display: flex; gap: 0.6rem; align-items: center; }

/* ----- Icon Buttons (🌐 & 🌓) – always visible ----- */
.ogp-btn-icon {
  background: #ffffff;
  border: 2px solid #ccc;
  color: #222;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
}
.ogp-icon {
  font-size: 1.3rem;
  display: block;
  line-height: 1;
}
.ogp-btn-icon:hover {
  border-color: #667eea;
  background: #f0f0ff;
  transform: scale(1.05);
}
.dark .ogp-btn-icon {
  background: #2a2a3a;
  border-color: #555;
  color: #eee;
}
.dark .ogp-btn-icon:hover {
  background: #3a3a4a;
  border-color: #667eea;
}

/* Tabs */
.ogp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
  justify-content: center;
}
.ogp-tab {
  background: #f0f0f0;
  border: 2px solid transparent;
  padding: 0.8rem 1.8rem;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: #333;
  transition: 0.25s;
}
.ogp-tab:hover { background: #e0e0ff; border-color: #667eea; }
.ogp-tab.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 10px 25px rgba(102,126,234,0.4);
  transform: translateY(-2px);
}
.dark .ogp-tab { background: #2a2a3a; color: #ccc; }
.dark .ogp-tab:hover { background: #3a3a4a; }

/* Cards */
.ogp-card {
  background: rgba(255,255,255,0.8);
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.dark .ogp-card {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

/* Form fields */
.ogp-form-group { margin-bottom: 1.2rem; }
.ogp-form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.ogp-form-group input,
.ogp-form-group textarea,
.ogp-form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #ccc;
  border-radius: 12px;
  background: #fff;
  font-size: 1rem;
  color: #222;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ogp-form-group textarea { min-height: 120px; resize: vertical; }
.ogp-form-group input:focus,
.ogp-form-group textarea:focus,
.ogp-form-group select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
  outline: none;
}
.dark .ogp-form-group input,
.dark .ogp-form-group textarea,
.dark .ogp-form-group select {
  background: #2a2a3a;
  border-color: #555;
  color: #eee;
}
.dark .ogp-form-group input:focus,
.dark .ogp-form-group textarea:focus,
.dark .ogp-form-group select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.3);
}

/* Generate button */
.ogp-generate-btn {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: #fff !important;
  border: none !important;
  padding: 1rem 2rem !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  border-radius: 40px !important;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 8px 20px rgba(102,126,234,0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  gap: 0.5rem;
}
.ogp-generate-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(102,126,234,0.6); }

/* Output box */
.ogp-professional-box {
  background: #fff;
  color: #222;
  border: 2px solid #ddd;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  padding: 2rem;
  font-family: 'Georgia', serif;
  font-size: 1.05rem;
  line-height: 1.8;
  white-space: pre-wrap;
  margin: 1.5rem 0;
}
.dark .ogp-professional-box { background: #2a2a38; color: #eee; border-color: #555; }

/* Action buttons */
.ogp-message-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; }
.ogp-message-actions .ogp-btn-sm {
  background: #f5f5f5;
  border: 2px solid #ccc;
  color: #222;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.2s;
}
.ogp-message-actions .ogp-btn-sm:hover { background: #e0e0ff; border-color: #667eea; transform: translateY(-1px); }
.dark .ogp-message-actions .ogp-btn-sm { background: #3a3a4a; border-color: #555; color: #eee; }
.dark .ogp-message-actions .ogp-btn-sm:hover { background: #4a4a5a; border-color: #667eea; }

/* Spinner */
.ogp-loading {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: ogp-spin 0.8s linear infinite;
  margin-left: 8px;
}
@keyframes ogp-spin { to { transform: rotate(360deg); } }

/* Fade-in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.ogp-card, .ogp-message-block { animation: fadeInUp 0.4s ease; }

/* Responsive */
@media (max-width: 600px) {
  .ogp-wrapper { padding: 1.5rem; margin: 1rem; }
  .ogp-tab { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
}