/* Voice Moments Demo - Shared Stylesheet */

/* Fonts */
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto/Roboto-VariableFont_wdth,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Merriweather';
  src: url('../fonts/Merriweather/Merriweather-VariableFont_opsz,wdth,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satisfy';
  src: url('../fonts/Satisfy/Satisfy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Design Tokens */
:root {
  --bg-page: #fcf8f1;
  --bg-card: #f6ede0;
  --bg-card-dark: #ebd8c2;
  --accent: #c25b3a;
  --accent-hover: #a94d30;
  --accent-gold: #c2a05e;
  --text-primary: #2a201a;
  --text-secondary: rgba(42, 32, 26, 0.65);
  --text-muted: rgba(42, 32, 26, 0.45);
  --border: #d9d9d9;
  --white: #ffffff;
  --shadow-card: 0px 2px 5px -1px rgba(107, 114, 128, 0.03),
    0px 4px 10px 0px rgba(107, 114, 128, 0.04),
    0px 1px 22px 0px rgba(107, 114, 128, 0.08);
  --shadow-elevated: 0px 10px 26px -6px rgba(107, 114, 128, 0.03),
    0px 20px 31px 3px rgba(107, 114, 128, 0.04),
    0px 8px 38px 7px rgba(107, 114, 128, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 32px;
  width: auto;
}

/* Main Container */
.container {
  flex: 1;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

/* Moment Title */
.moment-title {
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.35;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 24px;
}

/* Moment Card */
.moment-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Photo */
.photo-wrapper {
  width: 100%;
  overflow: hidden;
}

.moment-photo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Audio Player */
.player {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background-color: var(--white);
  margin: 0 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  position: relative;
  top: -12px;
}

.play-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  border: none;
  background-color: var(--accent);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.play-btn:hover {
  background-color: var(--accent-hover);
}

.play-btn:active {
  transform: scale(0.95);
}

.play-btn svg {
  width: 22px;
  height: 22px;
}

.play-btn .icon-pause {
  display: none;
}

.play-btn.playing .icon-play {
  display: none;
}

.play-btn.playing .icon-pause {
  display: block;
}

/* Player Body */
.player-body {
  flex: 1;
  min-width: 0;
}

.track-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-display {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 32px;
  font-variant-numeric: tabular-nums;
}

/* Progress Bar */
.progress-bar {
  flex: 1;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.progress-track {
  width: 100%;
  height: 6px;
  background-color: var(--bg-card-dark);
  border-radius: 3px;
  position: relative;
  overflow: visible;
}

.progress-fill {
  height: 100%;
  background-color: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
  position: relative;
}

.progress-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--accent);
  position: absolute;
  top: 50%;
  right: -7px;
  transform: translateY(-50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.progress-bar:hover .progress-thumb,
.progress-bar.dragging .progress-thumb {
  opacity: 1;
}

/* Description */
.description {
  padding: 20px;
}

.description p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px 20px;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer strong {
  font-weight: 600;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 20px 12px 40px;
  }

  .moment-title {
    font-size: 1.25rem;
  }

  .player {
    margin: 0 12px;
    padding: 12px 14px;
    gap: 10px;
  }

  .play-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  .play-btn svg {
    width: 18px;
    height: 18px;
  }

  .description {
    padding: 16px;
  }
}

@media (min-width: 641px) {
  .moment-title {
    font-size: 1.75rem;
  }
}
