:root {
  --bg-deep: #1a1f2e;
  --bg-card: #242b3d;
  --bg-hover: #2d3548;
  --terracotta: #C45B28;
  --terracotta-light: #d97a4a;
  --gold: #DAA520;
  --cream: #f5f0e8;
  --text-primary: #f5f0e8;
  --text-secondary: #a0a5b5;
  --text-muted: #6b7185;
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  background-image: 
    radial-gradient(ellipse at 20% 20%, rgba(196, 91, 40, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(218, 165, 32, 0.05) 0%, transparent 50%);
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(245, 240, 232, 0.1);
  background: rgba(26, 31, 46, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--terracotta), var(--terracotta-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(196, 91, 40, 0.3);
}

.logo-text h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.logo-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.app-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
}

@media (max-width: 900px) {
  .app-main {
    grid-template-columns: 1fr;
  }
  
  .sequence-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 50vh;
    border-radius: 20px 20px 0 0;
    z-index: 50;
  }
}

.poses-section {
  padding: 2rem;
  overflow-y: auto;
}

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

.section-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--cream);
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(245, 240, 232, 0.1);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: white;
}

.poses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.pose-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(245, 240, 232, 0.05);
  position: relative;
  overflow: hidden;
}

.pose-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--pose-color);
  opacity: 0;
  transition: opacity 0.2s;
}

.pose-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(245, 240, 232, 0.1);
}

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

.pose-card.in-sequence {
  border-color: var(--terracotta);
}

.pose-card.in-sequence::before {
  opacity: 1;
}

.pose-card-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pose-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(196, 91, 40, 0.1);
}

.pose-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.pose-name {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.pose-sanskrit {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.pose-duration {
  font-size: 0.75rem;
  color: var(--gold);
  background: rgba(218, 165, 32, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
}

.remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.pose-card:hover .remove-btn {
  opacity: 1;
}

.sequence-section {
  background: var(--bg-card);
  border-left: 1px solid rgba(245, 240, 232, 0.08);
  display: flex;
  flex-direction: column;
}

.sequence-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(245, 240, 232, 0.08);
}

.sequence-name-input {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--cream);
  width: 100%;
  margin-bottom: 0.5rem;
}

.sequence-name-input:focus {
  outline: none;
}

.sequence-meta {
  display: flex;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.dot {
  opacity: 0.5;
}

.sequence-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.empty-sequence {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-sequence p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.empty-hint {
  font-size: 0.8rem;
  opacity: 0.7;
}

.sequence-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-deep);
  border-radius: 12px;
  border-left: 3px solid var(--pose-color);
  transition: all 0.2s;
}

.sequence-item.active {
  background: rgba(196, 91, 40, 0.2);
}

.sequence-number {
  width: 24px;
  height: 24px;
  background: rgba(245, 240, 232, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.sequence-item-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sequence-pose-name {
  flex: 1;
  font-size: 0.9rem;
}

.duration-input {
  width: 50px;
  padding: 0.3rem;
  background: rgba(245, 240, 232, 0.05);
  border: 1px solid rgba(245, 240, 232, 0.1);
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.85rem;
  text-align: center;
}

.duration-input:focus {
  outline: none;
  border-color: var(--terracotta);
}

.duration-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sequence-remove-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.sequence-remove-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.sequence-actions {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(245, 240, 232, 0.08);
  display: flex;
  gap: 0.75rem;
}

.clear-btn {
  flex: 1;
  padding: 0.8rem;
  background: transparent;
  border: 1px solid rgba(245, 240, 232, 0.2);
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

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

.practice-btn {
  flex: 2;
  padding: 0.8rem;
  background: linear-gradient(135deg, var(--terracotta), var(--terracotta-light));
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.practice-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 20px rgba(196, 91, 40, 0.4);
}

/* Practice Mode */
.practice-mode {
  min-height: 100vh;
  background: var(--bg-deep);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.practice-exit-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(245, 240, 232, 0.1);
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  z-index: 10;
}

.practice-header {
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.practice-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .practice-main {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

.practice-pose-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.practice-pose-image {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.practice-info {
  text-align: center;
  padding: 2rem;
}

.practice-pose-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.practice-sanskrit {
  font-size: 1.2rem;
  color: var(--gold);
  font-style: italic;
  margin-bottom: 2rem;
}

.timer-display {
  margin: 2rem 0;
}

.timer-circle {
  width: 180px;
  height: 180px;
  position: relative;
  margin: 0 auto;
}

.timer-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.timer-bg {
  fill: none;
  stroke: rgba(245, 240, 232, 0.1);
  stroke-width: 8;
}

.timer-progress {
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  transition: stroke-dashoffset 1s linear;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--cream);
}

.cues-list {
  text-align: left;
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(245, 240, 232, 0.03);
  border-radius: 16px;
}

.cues-list h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.cue-item {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.practice-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.control-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(245, 240, 232, 0.2);
  background: transparent;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.control-btn:hover:not(:disabled) {
  background: rgba(245, 240, 232, 0.1);
}

.control-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.control-btn.play-pause {
  width: 80px;
  height: 80px;
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.control-btn.play-pause:hover {
  background: var(--terracotta-light);
}

.next-pose-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(245, 240, 232, 0.03);
  border-radius: 12px;
  margin: 0 2rem 2rem;
}

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

.next-pose-name {
  color: var(--cream);
  font-weight: 500;
}

.next-duration {
  color: var(--gold);
  font-size: 0.85rem;
}

/* Practice Complete */
.practice-complete {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
}

.complete-content {
  text-align: center;
  padding: 3rem;
}

.complete-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
}

.complete-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.complete-content p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.practice-stats {
  color: var(--gold) !important;
  margin-bottom: 2rem !important;
}

.exit-btn {
  padding: 1rem 2rem;
  background: var(--terracotta);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.exit-btn:hover {
  background: var(--terracotta-light);
}

.app-footer {
  padding: 1rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(245, 240, 232, 0.05);
}

.app-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.app-footer a:hover {
  color: var(--terracotta);
}