:root {
  --primary-color: #8A4FFF;
  --secondary-color: #FFA4DC;
  --background-color: #F8F7FF;
  --text-color: #333333;
  --light-text: #666666;
  --accent-color: #FFD166;
  --success-color: #06D6A0;
  --error-color: #EF476F;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
}

.ios-status-bar {
  height: 44px;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: transparent;
  font-size: 12px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.ios-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background-color: #000;
  border-radius: 3px;
  opacity: 0.3;
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 83px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding-bottom: 20px; /* Space for home indicator */
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--light-text);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
}

.tab-item.active {
  color: var(--primary-color);
}

.tab-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.main-container {
  min-height: calc(100vh - 127px); /* 100vh - (status bar + tab bar) */
  padding-bottom: 83px;
}

.button-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--box-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.button-secondary {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--box-shadow);
}

.ios-device {
  width: 375px;
  height: 812px;
  background-color: white;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  margin: 20px;
  border: 10px solid #111;
}

.ios-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
}

.ios-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 30px;
  background-color: #111;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 1000;
}

.page-container {
  padding: 20px;
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

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

.slide-up {
  animation: slideUp 0.3s ease-out;
}

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

/* Element specific styles */
.story-element {
  width: 70px;
  height: 70px;
  border-radius: 35px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 8px;
  box-shadow: var(--box-shadow);
}

.story-element img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.story-container {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px;
  margin: 16px 0;
  box-shadow: var(--box-shadow);
  line-height: 1.6;
}

.audio-player {
  display: flex;
  align-items: center;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
  padding: 12px 16px;
  margin: 16px 0;
}

.audio-player-controls {
  margin-right: 12px;
  font-size: 24px;
}

.audio-player-progress {
  flex-grow: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: relative;
}

.audio-player-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 35%;
  background-color: white;
  border-radius: 2px;
}

.story-element-container {
  display: flex;
  padding: 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.canvas-area {
  background-color: #f0eaff;
  border-radius: var(--border-radius);
  min-height: 200px;
  margin: 16px 0;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.parent-control-password {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.password-input {
  display: flex;
  margin: 20px 0;
}

.password-digit {
  width: 50px;
  height: 50px;
  border-radius: 25px;
  border: 2px solid var(--primary-color);
  margin: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
}

.password-digit.filled {
  background-color: var(--primary-color);
  color: white;
}

.device-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.page-title {
  display: flex;
  align-items: center;
}

.back-button {
  margin-right: 16px;
  font-size: 24px;
  color: var(--primary-color);
} 