@import url("https://fonts.googleapis.com/css2?family=Cormorant+SC:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap");

:root {
  --background-color: #f8f9fa;
  --surface-color: #ffffff;
  --surface-light: #f5f6f7;
  --surface-warm: #f9f8f6;
  --on-surface-light: #e8eaed;
  --primary-color: #4e8a78;
  --primary-hover: #3a7563;
  --secondary-color: #658e9c;
  --accent-color: #e0e0ce;
  --accent-light: #e8e6d8;
  --text-color: #262626;
  --text-secondary: #5f6368;
  --text-light: #80868b;
  --border-color: #dadce0;
  --border-light: #f1f3f4;
  --border-warm: #e3e1d6;
  --error-color: #d93025;
  --success-color: #4e8a78;
  --font-family-main: "Montserrat", sans-serif;
  --font-family-display: "Cormorant SC", serif;
  --header-height: 64px;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-warm: 0 2px 8px rgba(78, 138, 120, 0.08);
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-main);
  background: linear-gradient(135deg, var(--background-color) 0%, #f0f2f5 100%);
  color: var(--text-color);
  overflow: hidden;
}

/* Screen Containers & Transitions */
.screen {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.4s ease-in-out, visibility 0.4s;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom Scrollbar Styling */
.screen::-webkit-scrollbar {
  width: 10px;
}

.screen::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.screen::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.screen::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* Firefox scrollbar styling */
.screen {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.05);
}

.screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Auth Form Styles */
.auth-form {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  padding: 1rem;
  background: var(--surface-light);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 1rem;
  font-family: var(--font-family-main);
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--surface-color);
  box-shadow: 0 0 0 4px rgba(78, 138, 120, 0.1);
}

.helper-text {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
  font-style: italic;
}

.form-select {
  width: 100%;
  padding: 1rem;
  background: var(--surface-light);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 1rem;
  font-family: var(--font-family-main);
  transition: all 0.3s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(78, 138, 120, 0.1);
}

.form-button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: var(--surface-color);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-family-main);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.form-button:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #557a87 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.form-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-toggle {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-toggle button {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-toggle button:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.success-message {
  color: var(--success-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Landing Screen */
#landing-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(
    135deg,
    var(--background-color) 0%,
    var(--accent-color) 100%
  );
}

.landing-header h1 {
  font-family: var(--font-family-display);
  font-size: 4.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.landing-header p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-weight: 400;
}

.core-benefits {
  list-style: none;
  margin: 2.5rem 0;
  max-width: 500px;
}

.core-benefits li {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-color);
  font-weight: 500;
}

.core-benefits .icon {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
  flex-shrink: 0;
}

#voice-visualizer {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 2.5rem;
}

#voice-visualizer .circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  opacity: 0.3;
  animation: pulse 4s infinite ease-in-out;
}

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

.landing-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-btn {
  background: var(--surface-color);
  color: var(--text-color);
  border: 2px solid var(--primary-color);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-family-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: var(--shadow-light);
}

.landing-btn:hover {
  background: var(--primary-color);
  color: var(--surface-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.landing-btn.secondary {
  background: var(--surface-light);
  color: var(--text-color);
  border-color: var(--border-color);
}

.landing-btn.secondary:hover {
  background: var(--accent-color);
  border-color: var(--secondary-color);
}

.legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  gap: 0.5rem;
}

.legal-links .legal-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.2s ease;
}

.legal-links .legal-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.legal-link-separator {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0 0.5rem;
}

/* Auth Screen */
#auth-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 2rem 4rem 2rem;
  background: linear-gradient(
    135deg,
    var(--background-color) 0%,
    var(--accent-color) 100%
  );
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Ensure auth screen content can grow beyond viewport */
#auth-screen > * {
  flex-shrink: 0;
}

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

.auth-header h1 {
  font-family: var(--font-family-display);
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 500;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Recording Status Indicator */
#recording-status {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--error-color) 0%, #ff6b47 100%);
  color: var(--surface-color);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-medium);
}

#recording-status.hidden {
  opacity: 0;
  visibility: hidden;
}

/* --- Chat Screen --- */
/* Prevent page scroll: only chat window and sidebar list scroll */
#chat-screen {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--accent-color);
}

/* Enforce Montserrat font for all text within the chat screen only */
#chat-screen,
#chat-screen .header,
#chat-screen .user-info,
#chat-screen #chat-window,
#chat-screen .message-content,
#chat-screen .message-content strong,
#chat-screen .sidebar,
#chat-screen .chat-preview-btn,
#chat-screen #new-chat-btn,
#chat-screen .summary-btn,
#chat-screen .logout-btn,
#chat-screen .language-dropdown,
#chat-screen #chat-input,
#chat-screen .file-preview-chip,
#chat-screen .typing-indicator,
#chat-screen .chat-error,
#chat-screen .loading-message,
#chat-screen .input-row,
#chat-screen #chat-form,
#chat-screen .action-button,
#chat-screen .chat-title,
#chat-screen .delete-chat-btn,
#chat-screen .avatar,
#chat-screen .floating-summary-btn {
  font-family: var(--font-family-main);
}

.sidebar {
  width: 280px;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--accent-color) 0%,
    var(--accent-light) 100%
  );
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-right: 1px solid var(--border-warm);
  flex-shrink: 0;
  box-shadow: 2px 0 8px rgba(78, 138, 120, 0.1);
}

/* Chat sessions list has its own scroll */
#chat-history-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
}

/* Sidebar footer: Logout + Delete account at bottom - stacked vertically */
.sidebar .sidebar-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-warm);
  width: 100%;
  box-sizing: border-box;
}

.sidebar .sidebar-footer-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-family-main);
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  border: 2px solid transparent;
}

.sidebar .sidebar-logout-btn {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-color);
  border-color: rgba(78, 138, 120, 0.4);
  box-shadow: 0 2px 4px rgba(78, 138, 120, 0.15);
}

.sidebar .sidebar-logout-btn:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--surface-color);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(78, 138, 120, 0.25);
}

.sidebar .sidebar-delete-account-btn {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-secondary);
  border-color: rgba(217, 48, 37, 0.35);
}

.sidebar .sidebar-delete-account-btn:hover {
  background: rgba(217, 48, 37, 0.12);
  color: var(--error-color);
  border-color: var(--error-color);
}
#chat-history-list::-webkit-scrollbar {
  width: 8px;
}
#chat-history-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}
#chat-history-list::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 8px;
}

/* Style for the chat history buttons */
.chat-preview-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem;
  margin-bottom: 0.5rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-color);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(78, 138, 120, 0.1);
}

.chat-preview-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(78, 138, 120, 0.3);
  transform: translateY(-1px);
}

.chat-preview-btn.active {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--surface-color);
  border-color: transparent;
}

.chat-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}

.delete-chat-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s ease;
  opacity: 0;
  transform: scale(0.8);
}

.chat-preview-btn:hover .delete-chat-btn {
  opacity: 1;
  transform: scale(1);
}

.delete-chat-btn:hover {
  background: rgba(217, 48, 37, 0.1);
  color: var(--error-color);
}

.chat-container {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--accent-color);
  position: relative;
}

#new-chat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-color);
  border: 2px solid rgba(78, 138, 120, 0.3);
  padding: 1rem;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-family-main);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  width: 100%;
  box-shadow: 0 2px 8px rgba(78, 138, 120, 0.1);
}

#new-chat-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(78, 138, 120, 0.2);
}

.sidebar-upgrade-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--surface-color);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-family-main);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(78, 138, 120, 0.25);
}

.sidebar-upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78, 138, 120, 0.35);
}

.sidebar-upgrade-btn.hidden {
  display: none;
}

.header {
  height: var(--header-height);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-warm);
  flex-shrink: 0;
  background: linear-gradient(
    135deg,
    var(--accent-color) 0%,
    var(--accent-light) 100%
  );
  box-shadow: 0 2px 8px rgba(78, 138, 120, 0.1);
}

/* Use display font for the chat title */
#chat-screen .header h1 {
  font-family: var(--font-family-display);
  font-weight: 600;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

/* Profile dropdown: Summary to the left, profile icon with menu to the right */
.profile-dropdown-wrap {
  position: relative;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--surface-color);
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0;
  z-index: 1000;
}

.profile-dropdown.hidden {
  display: none;
}

.profile-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  text-align: left;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  font-family: var(--font-family-main);
  transition: background 0.15s ease;
}

.profile-dropdown-item:hover {
  background: var(--surface-light);
}

.profile-dropdown-item:first-child {
  border-radius: 12px 12px 0 0;
}

.profile-dropdown-item:last-child {
  border-radius: 0 0 12px 12px;
}

.logout-btn {
  background: linear-gradient(135deg, var(--error-color), #ff4444);
  color: var(--surface-color);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-family-main);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Summary button */
.summary-btn {
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--primary-color)
  );
  color: var(--surface-color);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-family-main);
  margin-right: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.summary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.summary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Profile button - user icon */
.profile-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--surface-color);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(78, 138, 120, 0.3);
  position: relative;
  overflow: hidden;
}
.profile-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(78, 138, 120, 0.4);
}
.profile-btn svg {
  position: relative;
  z-index: 1;
}

/* Profile modal form */
.profile-modal-content .modal-body form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.profile-modal-content label {
  font-weight: 600;
  color: var(--text-color);
}
.profile-modal-content input,
.profile-modal-content select.profile-select,
.profile-modal-content .profile-language-label {
  display: block;
  margin-bottom: 0.5rem;
}
.profile-modal-content select.profile-select {
  width: 100%;
  max-width: 20rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-warm);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-family-main);
  background: #f9fafb;
  color: var(--text-color);
}
.profile-modal-content .profile-language-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.profile-modal-content .profile-language-option {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-warm);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-family-main);
  background: #f9fafb;
  color: var(--text-color);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
}
.profile-modal-content .profile-language-option:hover {
  background: #f0f4f2;
  border-color: var(--primary-color);
}
.profile-modal-content .profile-language-option.selected {
  background: #e6f3ef;
  border-color: var(--primary-color);
  font-weight: 600;
  color: var(--primary-color);
}
.profile-modal-content .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Profile modal loading state (Basic Info) */
.profile-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 180px;
  color: var(--text-secondary);
  font-size: 14px;
}
.profile-loading-state.hidden {
  display: none !important;
}
.profile-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: profile-loading-spin 0.7s linear infinite;
}
@keyframes profile-loading-spin {
  to { transform: rotate(360deg); }
}
.profile-form-content.hidden {
  display: none !important;
}

/* Layered consent flow (4.1–4.4): simple language, large fonts (6th–8th grade), no legalese */
#consent-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}
.consent-container {
  max-width: 32rem;
  width: 100%;
  background: var(--surface-color);
  border-radius: 16px;
  box-shadow: var(--shadow-medium);
  padding: 2rem;
}
.consent-header {
  margin-bottom: 1.5rem;
}
.consent-title {
  font-family: var(--font-family-display);
  font-size: 1.75rem;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}
.consent-step-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.consent-lang-wrap {
  margin-bottom: 1.25rem;
}
.consent-lang-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.35rem;
}
.consent-lang-select {
  width: 100%;
  max-width: 14rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-warm);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--surface-light);
}
.consent-body {
  margin-bottom: 1.5rem;
}
.consent-main-text {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 1rem;
}
.consent-reminder {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.consent-list {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0 0 1.25rem 1.25rem;
  padding-left: 0.5rem;
}
.consent-list li {
  margin-bottom: 0.5rem;
}
.consent-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1.5;
}
.consent-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--primary-color);
}
.consent-checkbox-label {
  flex: 1;
}
.consent-step-content.hidden {
  display: none !important;
}
.consent-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Upload consent modal (4.1 Step 3) */
.upload-consent-content .modal-body {
  padding: 1rem 0;
}
.upload-consent-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--text-color);
}
.upload-consent-content .consent-checkbox-wrap {
  margin-top: 0.5rem;
}

/* Preferences button - Stylish icon-only */
.preferences-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--surface-color);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.preferences-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.preferences-btn svg {
  position: relative;
  z-index: 1;
  animation: rotateOnHover 0.5s ease-in-out;
}

.preferences-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.preferences-btn:hover svg {
  animation: rotateSettings 0.6s ease-in-out;
}

.preferences-btn:active {
  transform: translateY(0) scale(0.98);
}

@keyframes rotateSettings {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(90deg); }
}

.preferences-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.floating-summary-btn {
  position: fixed;
  bottom: 120px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--primary-color)
  );
  color: var(--surface-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-medium);
  z-index: 1000;
  transition: all 0.3s ease;
}

.floating-summary-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(78, 138, 120, 0.3);
}

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

.form-button.secondary {
  background: var(--surface-light);
  color: var(--text-color);
  border: 2px solid var(--border-color);
}

.form-button.secondary:hover {
  background: var(--accent-color);
  border-color: var(--secondary-color);
}

#otp-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.2rem;
  font-family: var(--font-family-main);
}

#chat-window {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  background: var(--accent-color);
}

.message-wrapper {
  width: 100%;
  display: flex;
  gap: 1rem;
  align-self: flex-start;
}

.user-message-wrapper {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  color: var(--surface-color);
  font-weight: 600;
  box-shadow: var(--shadow-light);
}

.message-content {
  max-width: 800px;
  padding: 1rem 1.5rem;
  line-height: 1.7;
  font-size: 1rem;
  word-wrap: break-word;
  border-radius: 12px 24px 24px 24px;
  background: var(--surface-warm);
  border: 1px solid var(--border-warm);
  box-shadow: var(--shadow-warm);
  font-family: var(--font-family-main);
}

.user-message-wrapper .message-content {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--surface-color);
  border-radius: 24px 12px 24px 24px;
  border: none;
}

.message-content strong {
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.user-message-wrapper .message-content strong {
  color: var(--surface-color);
}

/* Markdown content styling in messages */
.message-content h1,
.message-content h2,
.message-content h3 {
  margin: 0.75rem 0 0.35rem 0;
  font-weight: 600;
  color: var(--text-color);
}

.message-content h1:first-child,
.message-content h2:first-child,
.message-content h3:first-child {
  margin-top: 0;
}

.message-content h1 { font-size: 1.4rem; }
.message-content h2 { font-size: 1.2rem; }
.message-content h3 { font-size: 1.1rem; }

.message-content p {
  margin: 0.35rem 0;
}

.message-content p:first-of-type {
  margin-top: 0;
}

.message-content ul,
.message-content ol {
  margin: 0.35rem 0;
  padding-left: 1.5rem;
}

.message-content li {
  margin: 0.25rem 0;
}

.message-content a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.message-content a:hover {
  color: var(--primary-hover);
}

.message-content hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

/* Streaming: same bubble as regular messages (no grey box); content grows in place */
.message-content.streaming .streaming-content {
  display: inline;
}

.message-content code {
  background: var(--surface-light);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
}

.message-content blockquote {
  border-left: 3px solid var(--primary-color);
  padding-left: 1rem;
  margin: 0.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* User message markdown links */
.user-message-wrapper .message-content a {
  color: #fff;
  text-decoration: underline;
}

.user-message-wrapper .message-content a:hover {
  color: #e0e0e0;
}

/* Go to bottom button - centered above input */
.scroll-to-bottom-btn {
  position: absolute;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: var(--surface-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-medium);
  z-index: 10;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.scroll-to-bottom-btn:hover {
  transform: translateX(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(78, 138, 120, 0.35);
}
.scroll-to-bottom-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

.chat-input-area {
  padding: 1.5rem 2rem;
  flex-shrink: 0;
  background: linear-gradient(
    to top,
    var(--accent-light) 0%,
    var(--accent-color) 100%
  );
  border-top: 1px solid var(--border-warm);
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
}

.language-dropdown {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  background: var(--surface-color);
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-family-main);
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  min-width: 160px;
  box-shadow: var(--shadow-light);
}

.language-dropdown:hover {
  background: var(--surface-light);
  border-color: var(--secondary-color);
}

.language-dropdown:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(78, 138, 120, 0.1);
}

/* Keep language selector visible and nicely placed on smaller screens */
@media (max-width: 1024px) {
  #chat-screen .header {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }
  #chat-screen .header h1 {
    flex: 1 1 100%;
    text-align: center;
  }
  #chat-screen .user-info {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

/* Loading and error states */
.loading-message {
  opacity: 0.7;
  font-style: italic;
}

.chat-error {
  background: rgba(217, 48, 37, 0.1);
  border: 1px solid rgba(217, 48, 37, 0.2);
  color: var(--error-color);
  padding: 1rem;
  border-radius: 12px;
  margin: 8px 0;
  font-size: 14px;
  font-weight: 500;
}

#chat-form {
  flex-grow: 1;
  background: var(--surface-color);
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border-warm);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-warm);
}

#chat-form:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(78, 138, 120, 0.1);
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
}

#chat-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  padding: 1rem;
  line-height: 1.5;
  font-family: var(--font-family-main);
}

#chat-input:focus {
  outline: none;
}

#chat-input::placeholder {
  color: var(--text-secondary);
}

.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: none;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.action-button svg {
  width: 24px;
  height: 24px;
}

.action-button:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

#voice-conversation-btn {
  background: #10b981;
  color: #fff;
  width: 56px;
  height: 56px;
  margin-bottom: 2px;
}

#voice-conversation-btn:hover {
  background: #059669;
  color: #fff;
}

#voice-conversation-btn.active {
  background: #8b5cf6;
  color: #fff;
}

#voice-conversation-btn.active:hover {
  background: #7c3aed;
  color: #fff;
}

#chat-form-file-input {
  display: none;
}

#send-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--surface-color);
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

#send-btn:not([disabled]) {
  transform: scale(1);
  opacity: 1;
}

#send-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}

#mic-btn {
  background-color: var(--surface-light);
  border: 2px solid var(--border-color);
  width: 56px;
  height: 56px;
  margin-bottom: 2px;
}

#mic-btn.recording {
  background: linear-gradient(135deg, var(--error-color), #ff4444);
  border-color: var(--error-color);
  color: var(--surface-color);
  animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

#file-preview-container {
  display: none;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid var(--border-light);
  margin: 0 0.5rem;
}

.file-preview-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-color);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  animation: fadeInUp 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.remove-file-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
  line-height: 1;
  padding: 0 0 0 0.5rem;
  transition: color 0.2s ease;
}

.remove-file-btn:hover {
  color: var(--error-color);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

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

/* Chat Loading Indicator - shown when switching between chats */
.chat-loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 200px;
  width: 100%;
  padding: 40px 20px;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14px;
  margin: auto;
}

.chat-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: chat-loading-spin 0.8s linear infinite;
}

.chat-loading-indicator span {
  font-weight: 500;
  color: var(--text-secondary);
}

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

/* Session Loading Screen - shown when checking for cached session */
#session-loading-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--background-color);
}

#session-loading-screen.hidden {
  display: none;
}

.session-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.session-loading-logo {
  font-family: var(--font-family-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 4px;
  margin: 0;
}

.session-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: session-loading-spin 0.8s linear infinite;
}

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

.session-loading-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .header,
  #chat-window,
  .chat-input-area {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .landing-header h1 {
    font-size: 3rem;
  }

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

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

/* Language dropdown tweaks */
#language-menu {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-medium);
}

.lang-opt {
  font-family: var(--font-family-main);
  font-size: 0.95rem;
  color: var(--text-color);
  transition: all 0.2s ease;
}

.lang-opt:hover {
  background: var(--accent-color) !important;
  color: var(--primary-color);
}

/* Legal Acceptance Styles */
.legal-container {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--surface-warm);
  border-radius: 8px;
  border: 1px solid var(--border-warm);
}

.checkbox-row {
  display: block;
  width: 100%;
  margin-bottom: 0.75rem;
}

.checkbox-row:last-child {
  margin-bottom: 0;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.checkbox-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 0.75rem;
  margin-top: 0.125rem;
  cursor: pointer;
  accent-color: var(--primary-color);
  flex-shrink: 0;
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--text-color);
  line-height: 1.5;
}

.legal-link {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.legal-link:hover {
  color: var(--primary-hover);
}

/* Standalone legal pages (/privacy, /terms, /disclaimer, /support) – allow scroll */
body.legal-page-body {
  overflow-y: auto;
  overflow-x: hidden;
}
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-light);
}
.legal-page-header {
  padding: 1rem 1.5rem;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.legal-page-back {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}
.legal-page-back:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}
.legal-page-app-name {
  font-family: var(--font-family-display);
  font-size: 1.25rem;
  color: var(--primary-color);
}
.legal-page-main {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 48rem;
  margin: 0 auto;
  width: 100%;
}
.legal-page-content {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
}
.legal-page-content h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}
.legal-page-content h2 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}
.legal-page-content h3 {
  font-size: 1.05rem;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text-color);
}
.legal-page-content p,
.legal-page-content ul {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}
.legal-page-content ul {
  padding-left: 1.5rem;
}
.legal-page-content li {
  margin-bottom: 0.35rem;
}
.legal-page-footer {
  padding: 1rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: var(--surface-color);
}
.legal-page-footer a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}
.legal-page-footer a:hover {
  text-decoration: underline;
}

/* Legal Document Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none !important;
}

.modal-content {
  background: var(--surface-color);
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-medium);
  animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
  font-family: var(--font-family-display);
  font-size: 1.75rem;
  color: var(--primary-color);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--surface-light);
  color: var(--text-color);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--surface-light);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

#legal-modal-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-color);
}

#legal-modal-text h1 {
  font-family: var(--font-family-display);
  font-size: 2rem;
  color: var(--primary-color);
  margin: 1.5rem 0 1rem 0;
}

#legal-modal-text h1:first-child {
  margin-top: 0;
}

#legal-modal-text h2 {
  font-family: var(--font-family-display);
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 1.5rem 0 0.75rem 0;
}

#legal-modal-text h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 1rem 0 0.5rem 0;
}

#legal-modal-text p {
  margin: 0.75rem 0;
}

#legal-modal-text strong {
  font-weight: 600;
  color: var(--text-color);
}

#legal-modal-text li {
  margin: 0.5rem 0 0.5rem 1.5rem;
  list-style-type: disc;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}

.modal-footer .form-button {
  min-width: 120px;
}

/* Mobile Responsive for Modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 1rem 1.25rem;
  }

  .modal-header h2 {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 1.25rem;
  }

  #legal-modal-text {
    font-size: 0.9rem;
  }

  #legal-modal-text h1 {
    font-size: 1.75rem;
  }

  #legal-modal-text h2 {
    font-size: 1.35rem;
  }

  .modal-footer {
    padding: 1rem 1.25rem;
  }

  .legal-container {
    padding: 0.75rem;
  }

  .checkbox-label {
    font-size: 0.85rem;
  }
}

/* Payment Required Screen Styles */
#payment-required-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.payment-required-container {
  max-width: 600px;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.5s ease-out;
}

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

.payment-required-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: bounce 1s ease-in-out infinite;
}

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

.payment-required-title {
  font-size: 2rem;
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.payment-required-subtitle {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

.payment-required-message {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid #667eea;
}

.payment-required-message p {
  color: #374151;
  margin: 0.5rem 0;
  line-height: 1.6;
}

.payment-required-instructions {
  text-align: left;
  background: #fef3c7;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.payment-required-instructions h3 {
  color: #92400e;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.payment-required-instructions ol {
  color: #78350f;
  margin: 0;
  padding-left: 1.5rem;
}

.payment-required-instructions li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.payment-required-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.payment-required-actions .form-button {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-required-actions .form-button.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.payment-required-actions .form-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.payment-required-actions .form-button.secondary {
  background: transparent;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}

.payment-required-actions .form-button.secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .payment-required-container {
    padding: 2rem;
  }

  .payment-required-title {
    font-size: 1.5rem;
  }

  .payment-required-subtitle {
    font-size: 1rem;
  }

  .payment-required-icon {
    font-size: 4rem;
  }
}
