/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: #ffffff;
  color: #1e293b;
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Dark mode styles */
body.dark-mode {
  background: #0f172a;
  color: #f1f5f9;
}

.app {
  min-height: 100vh;
  background: #ffffff;
}

body.dark-mode .app {
  background: #0f172a;
}

/* Header Styles */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  transition: all 0.3s ease;
}

body.dark-mode .header {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid #334155;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #6366f1;
  line-height: 1;
}

.logo-icon {
  width: 28px;
  height: 28px;
  display: inline-block;
  vertical-align: middle;
  align-self: center;
  margin-bottom: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-name {
  font-size: 0.875rem;
  color: #64748b;
  display: none;
}

body.dark-mode .user-name {
  color: #cbd5e1;
}

.theme-toggle,
.logout-btn,
.install-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 12px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark-mode .theme-toggle,
body.dark-mode .logout-btn,
body.dark-mode .install-btn {
  color: #cbd5e1;
}

.theme-toggle:hover,
.logout-btn:hover,
.install-btn:hover {
  background: #f8fafc;
  color: #1e293b;
  transform: translateY(-1px);
}

body.dark-mode .theme-toggle:hover,
body.dark-mode .logout-btn:hover,
body.dark-mode .install-btn:hover {
  background: #1e293b;
  color: #f1f5f9;
}

.install-btn {
  background: #6366f1 !important;
  color: white !important;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  gap: 0.5rem;
}

.install-btn:hover {
  background: #5855eb !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

body.dark-mode .install-btn {
  background: #6366f1 !important;
  color: white !important;
}

body.dark-mode .install-btn:hover {
  background: #5855eb !important;
  color: white !important;
}

.theme-toggle svg,
.logout-btn svg {
  width: 20px;
  height: 20px;
}

/* Auth Form Styles */
.auth-container {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s ease-out;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

body.dark-mode .auth-card {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(51, 65, 85, 0.3);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
  flex-shrink: 0;
}

.auth-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.025em;
}

.auth-header p {
  color: #64748b;
  font-size: 0.875rem;
}

body.dark-mode .auth-header p {
  color: #cbd5e1;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  flex: 1;
}

.input-group,
.form-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  width: 20px;
  height: 20px;
  color: #6366f1;
  z-index: 1;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.form-group label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 500;
  z-index: 1;
  transition: all 0.2s ease;
  pointer-events: none;
  background: transparent;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 0.75rem;
  color: #6366f1;
  font-weight: 600;
  transform: translateY(-50%);
}

body.dark-mode .form-group label {
  color: #64748b;
}

body.dark-mode .form-group input:focus + label,
body.dark-mode .form-group input:not(:placeholder-shown) + label {
  color: #8b5cf6;
}

.input-group input {
  width: 100%;
  padding: 1.125rem 1rem 1.125rem 3rem;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-size: 1rem;
  background: #ffffff;
  color: #1e293b;
  transition: all 0.2s ease;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 1.125rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-size: 1rem;
  background: #ffffff;
  color: #1e293b;
  transition: all 0.2s ease;
  font-weight: 500;
}

body.dark-mode .input-group input {
  background: #0f172a;
  color: #f1f5f9;
  border: 2px solid #334155;
}

body.dark-mode .form-group input {
  background: #0f172a;
  color: #f1f5f9;
  border: 2px solid #334155;
}

.input-group input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

.form-group input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 8px;
  transition: color 0.15s ease;
}

.password-toggle:hover {
  color: #1e293b;
}

body.dark-mode .password-toggle:hover {
  color: #f1f5f9;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.auth-submit,
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  padding: 1.25rem;
  border-radius: 16px;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Secondary button style (used for "I've Verified – Continue") */
.btn-secondary {
  background: transparent;
  color: #6366f1;
  border: 2px solid #6366f1;
  padding: 0.9rem 1.25rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

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

.auth-submit::before,
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.auth-submit:hover::before,
.btn-primary:hover::before {
  left: 100%;
}

.auth-submit:hover,
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, #5855eb 0%, #7c3aed 100%);
}

.auth-submit:active,
.btn-primary:active {
  transform: translateY(0);
}

.auth-switch {
  text-align: center;
  margin-top: 2rem;
  color: #64748b;
  font-size: 0.875rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

#auth-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.875rem;
  flex-shrink: 0;
}

body.dark-mode #auth-toggle {
  border-top: 1px solid #334155;
  color: #cbd5e1;
}

body.dark-mode .auth-switch {
  color: #cbd5e1;
  border-top: 1px solid #334155;
}

.switch-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  color: white;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  margin: 0 0.5rem;
}

.switch-btn:hover {
  color: white;
  background: linear-gradient(135deg, #5855eb 0%, #7c3aed 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Google Button */
.btn-google {
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
  font-family: 'Roboto', sans-serif;
}

.btn-google::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8f9fa;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-google:hover::before {
  opacity: 1;
}

.btn-google:hover {
  border-color: #dadce0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.16);
}

.google-icon {
  z-index: 1;
  flex-shrink: 0;
}

/* Credits */
.credits {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: 0.875rem;
  flex-shrink: 0;
}

body.dark-mode .credits {
  border-top: 1px solid #334155;
  color: #64748b;
}

.credits .author {
  color: #6366f1;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.credits .author:hover {
  color: #8b5cf6;
  text-decoration: underline;
  transform: translateY(-1px);
}

body.dark-mode .credits .author {
  color: #8b5cf6;
}

body.dark-mode .credits .author:hover {
  color: #a855f7;
  text-decoration: underline;
  transform: translateY(-1px);
}

/* App Footer */
.app-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid #e2e8f0;
}

body.dark-mode .app-footer {
  border-top: 1px solid #334155;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 2rem 0;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.divider span {
  padding: 0 1rem;
  background: #ffffff;
}

body.dark-mode .divider::before,
body.dark-mode .divider::after {
  background: #334155;
}

body.dark-mode .divider span {
  background: #1e293b;
}

/* Journal Container */
.journal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.journal-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-bar {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
}

.search-bar input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  background: #ffffff;
  color: #1e293b;
  transition: all 0.15s ease;
}

body.dark-mode .search-bar input {
  background: #1e293b;
  color: #f1f5f9;
  border: 2px solid #334155;
}

.search-bar input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.category-filter {
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  background: #ffffff;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.dark-mode .category-filter {
  background: #1e293b;
  color: #f1f5f9;
  border: 2px solid #334155;
}

.category-filter:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.add-prayer-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.add-prayer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.add-prayer-btn svg {
  width: 20px;
  height: 20px;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Prayer Form Overlay */
.prayer-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

body.dark-mode .prayer-form-overlay {
  background: rgba(0, 0, 0, 0.7);
}

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

.prayer-form-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.3s ease;
}

body.dark-mode .prayer-form-card {
  background: #1e293b;
}

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

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
}

.form-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

body.dark-mode .form-header h2 {
  color: #f1f5f9;
}

.close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 12px;
  transition: all 0.15s ease;
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  z-index: 10;
}

.close-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  transform: scale(1.1);
}

body.dark-mode .close-btn:hover {
  background: #334155;
  color: #f1f5f9;
  transform: scale(1.1);
}

.close-btn svg {
  width: 20px;
  height: 20px;
}

.prayer-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.prayer-form .input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.prayer-form label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.875rem;
}

body.dark-mode .prayer-form label {
  color: #f1f5f9;
}

.prayer-form input,
.prayer-form select,
.prayer-form textarea {
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  background: #ffffff;
  color: #1e293b;
  transition: all 0.15s ease;
  font-family: inherit;
}

body.dark-mode .prayer-form input,
body.dark-mode .prayer-form select,
body.dark-mode .prayer-form textarea {
  background: #0f172a;
  color: #f1f5f9;
  border: 2px solid #334155;
}

.prayer-form input:focus,
.prayer-form select:focus,
.prayer-form textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Balanced view mode for prayer details */
.prayer-form input.view-mode,
.prayer-form textarea.view-mode,
.prayer-form select.view-mode,
.prayer-form input:disabled,
.prayer-form textarea:disabled,
.prayer-form select:disabled {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: none;
  padding-left: 1rem;
  padding-right: 1rem;
}
body.dark-mode .prayer-form input.view-mode,
body.dark-mode .prayer-form textarea.view-mode,
body.dark-mode .prayer-form select.view-mode,
body.dark-mode .prayer-form input:disabled,
body.dark-mode .prayer-form textarea:disabled,
body.dark-mode .prayer-form select:disabled {
  color: #e2e8f0;
  background: #1e293b;
  border: 1px solid #334155;
}

.prayer-form .form-group label,
.prayer-form label,
.prayer-form .answer-fields label {
  font-size: 0.95rem;
  color: #b0b8c9;
  font-weight: 400;
}

/* Start Edit Button */
#start-edit-btn {
  background: none;
  border: none;
  padding: 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  position: absolute;
  top: -0.5rem;
  right: 2.5rem;
  z-index: 10;
}

#start-edit-btn:hover {
  background: #f1f5f9;
  color: #6366f1;
  transform: scale(1.1);
}

#start-edit-btn i {
  width: 18px;
  height: 18px;
}

body.dark-mode #start-edit-btn:hover {
  background: #334155;
  color: #6366f1;
  transform: scale(1.1);
}

.prayer-form textarea {
  resize: none;
  min-height: 150px;
  font-size: 1rem;
  line-height: 1.6;
  width: 100%;
  box-sizing: border-box;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
}

.checkbox-group label {
  font-weight: 500;
  cursor: pointer;
}

.answer-fields {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 1.5rem;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
}

.answer-fields textarea {
  min-height: 120px;
  font-size: 1rem;
  line-height: 1.6;
  width: 100%;
  box-sizing: border-box;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.cancel-btn,
.submit-btn {
  flex: 1;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.cancel-btn {
  background: #f8fafc;
  color: #64748b;
}

body.dark-mode .cancel-btn {
  background: #1e293b;
  color: #cbd5e1;
}

.cancel-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

body.dark-mode .cancel-btn:hover {
  background: #334155;
  color: #f1f5f9;
}

.submit-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Prayer List */
.prayer-list {
  display: grid;
  gap: 1.5rem;
}

.prayer-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

body.dark-mode .prayer-card {
  background: linear-gradient(145deg, #1e293b 0%, #334155 100%);
  border: 1px solid #334155;
}

.prayer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.prayer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

.prayer-card.answered::before {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  opacity: 1;
}

.prayer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.prayer-title-section {
  flex: 1;
}

.prayer-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

body.dark-mode .prayer-title {
  color: #f1f5f9;
}

.prayer-category {
  background: #6366f1;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.prayer-actions {
  display: flex;
  gap: 0.5rem;
}

.answer-toggle,
.edit-btn,
.delete-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.answer-toggle {
  color: #94a3b8;
}

.answer-toggle.answered {
  color: #10b981;
}

.answer-toggle:hover {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.edit-btn {
  color: #94a3b8;
}

.edit-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.delete-btn {
  color: #94a3b8;
}

.delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.answer-toggle svg,
.edit-btn svg,
.delete-btn svg {
  width: 18px;
  height: 18px;
}

.prayer-content {
  margin-bottom: 1rem;
}

.prayer-content p {
  color: #64748b;
  line-height: 1.6;
  font-size: 1rem;
}

body.dark-mode .prayer-content p {
  color: #cbd5e1;
}

.prayer-answer {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.prayer-answer h4 {
  color: #10b981;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.prayer-answer p {
  color: #64748b;
  font-size: 1rem;
  line-height: 1.5;
}

body.dark-mode .prayer-answer p {
  color: #cbd5e1;
}

.prayer-footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

body.dark-mode .prayer-footer {
  border-top: 1px solid #334155;
}

.prayer-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.95rem;
}

.date-icon {
  width: 14px;
  height: 14px;
}

/* Empty State */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.empty-content {
  text-align: center;
  max-width: 400px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  color: #94a3b8;
  margin: 0 auto 1rem;
}

.empty-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

body.dark-mode .empty-content h3 {
  color: #f1f5f9;
}

.empty-content p {
  color: #64748b;
  line-height: 1.6;
}

body.dark-mode .empty-content p {
  color: #cbd5e1;
}

/* Responsive Design */
@media (min-width: 640px) {
  .search-section {
    flex-direction: row;
    align-items: center;
  }
  
  .category-filter {
    min-width: 200px;
  }
  
  .journal-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .user-name {
    display: block;
  }
  
  .form-actions {
    flex-direction: row;
  }
  
  .form-actions button {
    flex: none;
    min-width: 120px;
  }
}

@media (min-width: 768px) {
  .prayer-list {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  }
  
  .journal-container {
    padding: 3rem 2rem;
  }
  
  .auth-card {
    padding: 3rem;
  }
  
  .prayer-form-card {
    padding: 3rem;
  }
}

@media (min-width: 1024px) {
  .header-content {
    padding: 1.5rem 2rem;
  }
  
  .prayer-actions {
    opacity: 0;
    transition: opacity 0.15s ease;
  }
  
  .prayer-card:hover .prayer-actions {
    opacity: 1;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {
  .auth-container {
    padding: 0.5rem;
    align-items: flex-start;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .auth-card {
    max-width: 100%;
    padding: 1.5rem;
    border-radius: 20px;
    max-height: calc(100vh - 2rem);
    margin: 0;
  }

  .auth-header h1 {
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
  }

  .auth-header p {
    font-size: 0.875rem;
  }

  .auth-form {
    gap: 1.25rem;
  }

  .form-group input,
  .input-group input {
    padding: 1rem;
    font-size: 1rem;
  }

  .btn-primary,
  .auth-submit {
    padding: 1rem;
    font-size: 1rem;
  }

  .btn-google {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }

  .divider {
    margin: 1.5rem 0;
  }

  #auth-toggle {
    margin-top: 1.5rem;
    padding-top: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .switch-btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .credits {
    margin-top: 1rem;
    padding-top: 0.75rem;
    font-size: 0.75rem;
  }

  .google-icon {
    width: 16px;
    height: 16px;
  }

  .prayer-form textarea {
    min-height: 120px;
    font-size: 0.875rem;
  }

  .answer-fields textarea {
    min-height: 100px;
    font-size: 0.875rem;
  }

  /* Make clickable icons a bit smaller on mobile */
  .answer-toggle,
  .edit-btn,
  .delete-btn {
    padding: 0.6rem;
    min-width: 40px;
    min-height: 40px;
  }
  .answer-toggle svg,
  .edit-btn svg,
  .delete-btn svg {
    width: 20px;
    height: 20px;
  }
  .answer-toggle i,
  .edit-btn i,
  .delete-btn i {
    font-size: 20px;
    line-height: 1;
  }
  .theme-toggle,
  .logout-btn {
    padding: 0.6rem;
    min-width: 40px;
    min-height: 40px;
  }
  .theme-toggle svg,
  .logout-btn svg {
    width: 20px;
    height: 20px;
  }
  .theme-toggle i,
  .logout-btn i {
    font-size: 20px;
    line-height: 1;
  }
  .close-btn {
    padding: 0.6rem;
    min-width: 40px;
    min-height: 40px;
  }
  .close-btn svg {
    width: 20px;
    height: 20px;
  }
  .close-btn i {
    font-size: 20px;
    line-height: 1;
  }
  #start-edit-btn {
    padding: 0.6rem;
    min-width: 40px;
    min-height: 40px;
  }
  #start-edit-btn i {
    font-size: 20px;
    line-height: 1;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
  .auth-container {
    padding: 0.25rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .auth-card {
    padding: 1.25rem;
    border-radius: 16px;
    max-height: calc(100vh - 1rem);
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .auth-header {
    margin-bottom: 2rem;
  }

  .auth-form {
    gap: 1rem;
  }

  .form-group input,
  .input-group input {
    padding: 0.875rem;
    font-size: 0.875rem;
  }

  .btn-primary,
  .auth-submit {
    padding: 0.875rem;
    font-size: 0.875rem;
  }

  .btn-google {
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
  }

  .divider {
    margin: 1.25rem 0;
  }

  #auth-toggle {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
  }

  .switch-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
  }

  .credits {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    font-size: 0.75rem;
  }

  .prayer-form textarea {
    min-height: 100px;
    font-size: 0.875rem;
  }

  .answer-fields textarea {
    min-height: 80px;
    font-size: 0.875rem;
  }

  /* Make clickable icons even bigger on very small mobile devices */
  .answer-toggle,
  .edit-btn,
  .delete-btn {
    padding: 0.7rem;
    min-width: 44px;
    min-height: 44px;
  }
  .answer-toggle svg,
  .edit-btn svg,
  .delete-btn svg {
    width: 22px;
    height: 22px;
  }
  .answer-toggle i,
  .edit-btn i,
  .delete-btn i {
    font-size: 22px;
    line-height: 1;
  }
  .theme-toggle,
  .logout-btn {
    padding: 0.7rem;
    min-width: 44px;
    min-height: 44px;
  }
  .theme-toggle svg,
  .logout-btn svg {
    width: 22px;
    height: 22px;
  }
  .theme-toggle i,
  .logout-btn i {
    font-size: 22px;
    line-height: 1;
  }
  .close-btn {
    padding: 0.7rem;
    min-width: 44px;
    min-height: 44px;
  }
  .close-btn svg {
    width: 22px;
    height: 22px;
  }
  .close-btn i {
    font-size: 22px;
    line-height: 1;
  }
  #start-edit-btn {
    padding: 0.7rem;
    min-width: 44px;
    min-height: 44px;
  }
  #start-edit-btn i {
    font-size: 22px;
    line-height: 1;
  }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .auth-container {
    align-items: center;
    padding: 0.5rem;
  }

  .auth-card {
    max-height: 85vh;
  }

  .auth-header {
    margin-bottom: 1.5rem;
  }

  .auth-form {
    gap: 1rem;
  }

  .form-group input,
  .input-group input {
    padding: 0.75rem;
  }

  .btn-primary,
  .auth-submit {
    padding: 0.75rem;
  }

  .btn-google {
    padding: 0.75rem 1rem;
  }
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

body.dark-mode ::-webkit-scrollbar-track {
  background: #1e293b;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: #475569;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .header,
  .prayer-actions,
  .add-prayer-btn,
  .search-section {
    display: none;
  }
  
  .prayer-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    margin-bottom: 1rem;
  }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: white;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Success Message */
.success-message {
  background: #22c55e !important; /* solid green */
  color: #fff !important;
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-filter label {
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}
.status-filter input[type="checkbox"] {
  accent-color: var(--primary-color);
  width: 1rem;
  height: 1rem;
  margin-right: 0.25rem;
}

body.dark-mode .status-filter label {
  color: #f1f5f9;
}
body.dark-mode .status-filter input[type="checkbox"] {
  accent-color: #6366f1;
  background: #1e293b;
  border: 1px solid #334155;
  /* Custom dark mode checkbox for better compatibility */
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  position: relative;
  outline: none;
  cursor: pointer;
  box-shadow: none;
}
body.dark-mode .status-filter input[type="checkbox"]:checked {
  background: #6366f1;
  border: 1px solid #6366f1;
}
body.dark-mode .status-filter input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  position: absolute;
  left: 3px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.toggle-view-btn {
  background: none !important;
  border: none;
  padding: 0.5rem;
  border-radius: 12px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}
.toggle-view-btn:hover {
  background: none !important;
  color: #1e293b;
  transform: translateY(-1px);
}
body.dark-mode .toggle-view-btn {
  color: #cbd5e1;
}
body.dark-mode .toggle-view-btn:hover {
  background: none !important;
  color: #f1f5f9;
}
.toggle-view-icon {
  fill: #1e293b;
  background: none;
  box-shadow: none;
  transition: fill 0.2s;
}
body.dark-mode .toggle-view-icon {
  fill: #e3e3e3;
  background: none;
  box-shadow: none;
}

.prayer-actions.small button,
.prayer-actions.small .answer-toggle,
.prayer-actions.small .edit-btn,
.prayer-actions.small .delete-btn {
  padding: 0.25rem 0.3rem;
  font-size: 0.85rem;
  border-radius: 6px;
  min-width: 28px;
  min-height: 28px;
  width: 28px;
  height: 28px;
}
.prayer-actions.small i,
.prayer-actions.small svg {
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
}

.detail-only-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
.prayer-title-tag-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.prayer-title-tag-row .prayer-category {
  margin-right: 0.5rem;
}
.prayer-title-tag-row .prayer-actions.small {
  margin-left: 0;
  margin-top: 0;
  display: flex;
  gap: 0.25rem;
} 

/* Drag-and-drop styles */
.dragging-solid {
  opacity: 1 !important;
  box-shadow: 0 0 10px 2px #6366f1;
  z-index: 1000;
}
.drag-over {
  outline: 2px dashed #6366f1;
  background: #f0f4ff;
} 

/* iOS Add to Home Screen Banner - refined */
.ios-install-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 20px;
    z-index: 1002;
    display: flex;
    justify-content: center;
    pointer-events: none; /* allow clicks only on inner card */
}
.ios-install-banner.hidden { display: none; }
.ios-install-content {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    max-width: 680px;
    width: calc(100% - 32px);
    margin: 0 16px;
    background: var(--card-bg, #ffffff);
    color: var(--text-primary, #111827);
    box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,0.15));
    border: 1px solid var(--border-color, #e5e7eb);
    padding: .45rem .75rem .6rem; /* reduced top padding */
    border-radius: 14px;
}
.ios-install-text { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; line-height: 1.25; }
.ios-steps { display: flex; align-items: center; gap: .3rem; color: var(--text-secondary, #6b7280); font-size: .85rem; flex-wrap: wrap; }
.ios-steps .separator { opacity: .6; }
.ios-svg-icon { display: inline-flex; align-items: center; color: var(--text-secondary, #6b7280); }
.ios-hint { font-size: .78rem; color: var(--text-secondary, #6b7280); }
.ios-install-dismiss { background: transparent; border: none; color: var(--text-secondary, #6b7280); cursor: pointer; padding: .25rem; border-radius: 8px; align-self: flex-start; }
.ios-install-dismiss:hover { background: rgba(0,0,0,0.06); }

@supports (backdrop-filter: blur(6px)) {
    .ios-install-content { backdrop-filter: blur(8px); background: color-mix(in hsl, var(--card-bg, #fff) 86%, transparent); }
}

@media (prefers-color-scheme: dark) {
    .ios-install-content { background: var(--card-bg, #111827); border-color: var(--border-color, #374151); }
} 

/* iOS Add to Home Screen - dark card style */
#ios-a2hs {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: slideUp .25s ease;
}
#ios-a2hs.hidden { display: none; }
#ios-a2hs .ios-a2hs-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
#ios-a2hs .ios-a2hs-text { font-size: 14px; line-height: 1.35; }
#ios-a2hs .ios-steps { color: #cbd5e1; font-size: 13px; gap: 8px; margin-top: 2px; display: flex; align-items: center; flex-wrap: wrap; }
#ios-a2hs .ios-svg-icon { display: inline-flex; color: #e5e7eb; }
#ios-a2hs .separator { opacity: .7; }
#ios-a2hs .ios-hint { color: #9aa7b6; font-size: 12px; margin-top: 2px; }
#ios-a2hs #ios-install-dismiss {
    margin-left: auto;
    background: transparent;
    color: #cbd5e1;
    border: none;
    font-size: 20px;
    line-height: 1;
    width: 32px; height: 32px;
    border-radius: 8px;
}
#ios-a2hs #ios-install-dismiss:active { transform: scale(0.95); }
@keyframes slideUp { from { transform: translateY(12px); opacity: .0; } to { transform: translateY(0); opacity: 1; } } 

/* Auth tabs */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--surface-100, #f3f4f6); padding: .25rem; border-radius: 10px; margin: 0 0 1rem; width: 100%; position: relative; }
.auth-tab { border: none; background: transparent; padding: .75rem 1rem; border-radius: 8px; color: var(--text-secondary); cursor: pointer; font-weight: 700; font-size: 1rem; }
.auth-tab.active { background: var(--primary-50, #eef2ff); color: var(--primary-700, #4f46e5); box-shadow: inset 0 0 0 1px var(--primary-100, #e0e7ff); }
body.dark-mode .auth-tabs { background: rgba(255,255,255,.06); }
body.dark-mode .auth-tab.active { background: rgba(99, 102, 241, .18); color: #c7d2fe; box-shadow: inset 0 0 0 1px rgba(99,102,241,.3); } 

/* Auth container layout to center card and fit viewport */
.auth-container { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { max-width: 420px; width: 100%; }

/* Vertical-fit responsive rules (height-based) */
@media (max-height: 780px) {
    .auth-header { margin-bottom: .75rem; }
    .auth-header h1 { font-size: 1.4rem; }
    .auth-tabs { margin-bottom: .75rem; }
    .auth-tab { padding: .65rem .9rem; font-size: .95rem; }
    .auth-form .form-group { margin-bottom: .75rem; }
    .auth-form input, .auth-form textarea, .auth-form select { padding-top: .8rem; padding-bottom: .8rem; }
    .btn-primary, .btn-google { padding: .65rem .9rem; }
    .divider { margin: .6rem 0; }
}
@media (max-height: 700px) {
    .auth-header i { font-size: 1.6rem; }
    .auth-header p { display: none; }
    .auth-tab { padding: .55rem .8rem; font-size: .92rem; }
    .auth-form input, .auth-form textarea, .auth-form select { padding-top: .7rem; padding-bottom: .7rem; }
    .btn-primary, .btn-google { padding: .55rem .8rem; font-size: .95rem; }
}
@media (max-height: 640px) {
    .auth-header h1 { font-size: 1.25rem; }
    .auth-card { max-width: 384px; }
    .auth-tab { padding: .5rem .7rem; font-size: .9rem; }
    .auth-form label { font-size: .9rem; }
    .auth-form input, .auth-form textarea, .auth-form select { padding-top: .6rem; padding-bottom: .6rem; font-size: .95rem; }
    .btn-primary, .btn-google { padding: .5rem .7rem; font-size: .92rem; }
}
@media (max-height: 580px) {
    .auth-header { margin-bottom: .5rem; }
    .auth-header i { display: none; }
    .auth-tabs { padding: .2rem; }
    .auth-tab { padding: .45rem .6rem; font-size: .88rem; }
    .auth-form .form-group { margin-bottom: .6rem; }
    .divider { margin: .5rem 0; }
}
@media (max-height: 540px) {
    .auth-card { max-width: 360px; }
    .btn-google svg { width: 16px; height: 16px; }
    .btn-google { gap: .4rem; }
} 
/* enable clicks inside the iOS A2HS card */
#ios-a2hs .ios-a2hs-content { 
  pointer-events: auto; 
}
.ios-steps {
  display: flex;
  flex-direction: column; /* stack vertically */
  gap: 0.5rem;            /* spacing between steps */
  align-items: flex-start;
}

.ios-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
