/* 
  Daily Motivation - Exact Flutter Replica CSS
  Theme: Deep Purple / White Mode First
*/


* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
}

/* App Header (Exact Flutter AppBar Replica) */
.dm-app-bar {
  height: 80px;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.dm-app-bar__icon-btn {
  background: none;
  border: none;
  padding: 12px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.dm-app-bar__icon-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dm-app-bar__logo {
  height: 60px;
  cursor: pointer;
}

/* Hex Bolt Wrapper */
.dm-hex-bolt {
  width: 24px;
  height: 24px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dm-hex-bolt::after {
  content: '';
  width: 8px;
  height: 8px;
  background: grey;
  border-radius: 50%;
}

/* Main Container */
.dm-container {
  margin: 80px auto 0;
  padding: 24px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Quote Card (Exact Replica) */
.dm-quote-card-container {
  position: relative;
  margin: 16px 0;
}

.dm-quote-card {
  background-color: var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(103, 58, 183, 0.1);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dm-quote-card__text {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.dm-quote-card__bolt {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  color: #2196f3;
  z-index: 10;
  transition: transform 0.2s;
}

.dm-quote-card__bolt:hover {
  transform: scale(1.1);
}

/* Action Buttons (Stadium Border) */
.dm-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
  transition: background 0.2s;
}

.dm-btn:hover {
  background: var(--primary-dark);
}

.dm-btn--secondary {
  background: white;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.dm-btn--secondary:hover {
  background: var(--primary-light);
}

/* Forms (Exact Flutter Look) */
.dm-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dm-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dm-field label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.dm-input {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.dm-input:focus {
  border-color: var(--primary);
}

/* Bottom Sheet Modal */
.dm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.dm-modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.dm-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  max-height: 90vh;
  z-index: 210;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.dm-bottom-sheet.is-active {
  transform: translateY(0);
}

.dm-bottom-sheet__handle {
  width: 40px;
  height: 4px;
  background: #eee;
  border-radius: 2px;
  margin: -12px auto 24px;
}

.dm-bottom-sheet__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.dm-bottom-sheet__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.dm-bottom-sheet__content {
  flex: 1;
  overflow-y: auto;
  font-size: 1.1rem;
  padding-bottom: 32px;
}

/* Screen States */
.dm-screen {
  display: none;
}

.dm-screen.is-active {
  display: block;
}

/* Utilities */
.hidden {
  display: none;
}

.text-center {
  text-align: center;
}

.mt-auto {
  margin-top: auto;
}

/* Ads Placeholder */
.dm-ad-container {
  margin-top: 24px;
  height: 100px;
  background: #f9f9f9;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 0.8rem;
  border: 1px dashed #ddd;
}

/* Material List Tiles (Exact Flutter Replica) */
.dm-tile-group {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-inline: 4px;
}

.dm-tile {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 16px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dm-tile:hover {
  background: #f9f9f9;
}

.dm-tile__leading {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eee;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Icon Variations */
.dm-tile__leading.bg-blue {
  background: #2196f3;
}

.dm-tile__leading.bg-purple {
  background: #673ab7;
}

.dm-tile__leading.bg-orange {
  background: #ff9800;
}

.dm-tile__leading.bg-green {
  background: #4caf50;
}

.dm-tile__leading.bg-red {
  background: #f44336;
}

.dm-tile__content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dm-tile__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.dm-tile__subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dm-tile__trailing {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dm-divider {
  height: 1px;
  background: #eee;
  margin: 0 16px;
}

/* Profile Header (Flutter Style) */
.dm-profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
}

.dm-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: var(--shadow-elevation);
}

.dm-profile-header__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.dm-profile-header__id {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: #f0f0f0;
  padding: 4px 12px;
  border-radius: 12px;
  margin-top: 8px;
}

/* Material Switch (Exact Flutter Replica) */
.dm-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  transition: background 0.3s;
  cursor: pointer;
}

.dm-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dm-switch.is-on {
  background: #2196f3;
}

.dm-switch.is-on::after {
  transform: translateX(20px);
}

/* Section Header */
.dm-section-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 16px 0 8px 16px;
}

.dm-section-header--primary {
  color: var(--primary);
  letter-spacing: 1.1px;
}

/* Flutter-exact Settings List Tile */
.dm-settings-list {
  margin-bottom: 4px;
}

.dm-list-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.dm-list-tile:hover {
  background: rgba(0, 0, 0, 0.04);
}

.dm-list-tile__title {
  font-size: 1rem;
  color: var(--text-main);
}

.dm-list-tile__title--bold {
  font-weight: 700;
}

.dm-list-tile__trailing-text {
  font-size: 0.95rem;
  color: var(--text-main);
}

.dm-list-tile__pill {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-main);
}

.dm-check-icon {
  flex-shrink: 0;
}

.dm-check-icon.hidden {
  display: none;
}

/* Flutter-exact Form Styles (Login / Signup) */
.dm-flutter-form {
  padding: 16px;
}

.dm-flutter-input {
  display: block;
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  background: transparent;
}

.dm-flutter-input::placeholder {
  color: var(--text-muted);
  font-size: 1rem;
}

.dm-flutter-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #ede7f6;
  color: #673ab7;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.dm-flutter-btn:hover {
  background: #d1c4e9;
}

.dm-error-text {
  color: #f44336;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* Flutter-exact Profile Screen */
.dm-flutter-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}

.dm-flutter-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dm-flutter-profile__name {
  font-size: 1.125rem;
  color: var(--text-main);
  margin: 0;
}

.dm-flutter-profile__id-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 16px;
  margin-bottom: 4px;
  text-align: center;
  letter-spacing: 1px;
}

.dm-flutter-profile__id-value {
  font-size: 1rem;
  font-weight: 400;
  color: var(--primary);
  margin: 0;
  text-align: center;
  background: #f5f5f5;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: monospace;
}

.dm-flutter-profile__guest-text {
  font-size: 1.125rem;
  color: #9e9e9e;
  margin: 0;
}

/* Flutter-exact Saved Quotes Screen */
.dm-saved-list {
  display: flex;
  flex-direction: column;
}

.dm-saved-tile {
  display: flex;
  align-items: flex-start;
  padding: 14px 16px;
  gap: 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.dm-saved-tile:hover {
  background: rgba(0, 0, 0, 0.04);
}

.dm-saved-tile__icon {
  flex-shrink: 0;
  color: var(--text-muted);
  margin-top: 2px;
}

.dm-saved-tile__text {
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.5;
}

.dm-empty-state {
  text-align: center;
  color: var(--text-main);
  font-size: 1rem;
  padding: 48px 16px;
}

.dm-hidden-input {
  display: none;
}

.dm-flutter-avatar {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
  background: #eee;
  border: 1px solid #ddd;
}

.dm-flutter-avatar:active {
  transform: scale(0.95);
}

.dm-flutter-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Material 3 AlertDialog (Exact Flutter Replica) */
.dm-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.dm-dialog-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.dm-dialog {
  background: #ffffff;
  border-radius: 28px;
  /* Material 3 standard */
  width: min(312px, 90vw);
  /* Material 3 standard width */
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transform: scale(0.9);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dm-dialog-overlay.is-active .dm-dialog {
  transform: scale(1);
}

.dm-dialog__title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-main);
  margin: 0 0 16px 0;
}

.dm-dialog__content {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
  white-space: pre-wrap;
  /* For line breaks in subscription cancel info */
}

.dm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dm-dialog__btn {
  background: none;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.dm-dialog__btn:hover {
  background: var(--primary-light);
}