/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #000;
  --surface: #111;
  --surface-2: #1a1a1a;
  --surface-3: #222;
  --text: #fff;
  --text-secondary: #888;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-dark: #5b21b6;
  --danger: #ef4444;
  --success: #22c55e;
  --nav-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
}

/* ===== SCREENS ===== */
.screen {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}
.screen.active { display: block; }
.screen::-webkit-scrollbar { display: none; }

/* ===== FEED ===== */
.feed-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 50px 0 20px;
}

.feed-item {
  position: relative;
  width: 100%;
  aspect-ratio: 9/14;
  overflow: hidden;
  cursor: pointer;
}

.feed-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.feed-item-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 60px 16px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-item-creator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-item-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.feed-item-username {
  font-size: 13px;
  font-weight: 600;
}

.feed-item-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.feed-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.feed-item-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.feed-item-branches {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(0,0,0,0.6);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.feed-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-create-card {
  width: 100%;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border-radius: 16px;
  margin: 8px 16px;
  width: calc(100% - 32px);
  cursor: pointer;
  border: 2px dashed var(--surface-3);
  transition: border-color 0.2s;
}
.feed-create-card:hover { border-color: var(--accent); }

.feed-create-icon {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-create-text {
  font-size: 16px;
  font-weight: 600;
}

.feed-create-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

.feed-header {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 50;
  padding: 12px 16px;
  background: linear-gradient(var(--bg), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feed-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.feed-logo span { color: var(--accent); }

/* ===== PLAYER ===== */
.player-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.player-video {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.player-gradient-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(rgba(0,0,0,0.6), transparent);
  z-index: 2;
}

.player-gradient-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  z-index: 2;
}

.player-back {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 10;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
}

.player-episode-badge {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.player-center-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s;
  cursor: pointer;
}
.player-center-play.visible { opacity: 0.8; }

.player-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
  z-index: 10;
}

.player-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

.player-sidebar {
  position: absolute;
  right: 10px;
  bottom: 100px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.15s;
}
.sidebar-item:active { transform: scale(0.9); }
.sidebar-item span { font-size: 11px; }
.sidebar-item.liked svg { fill: var(--danger); stroke: var(--danger); }

.player-info {
  position: absolute;
  bottom: 16px; left: 14px; right: 64px;
  z-index: 10;
}

.player-creator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.player-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.player-username {
  font-size: 14px;
  font-weight: 600;
}

.player-title {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.3;
}

/* ===== CONTINUATION ===== */
.continuation-wrapper {
  padding: 0 16px 20px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.continuation-header {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.continuation-back {
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 8px;
}

.continuation-title-text {
  font-size: 24px;
  font-weight: 700;
}

.continuation-episode-info {
  font-size: 14px;
  color: var(--text-secondary);
}

.continuation-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.continuation-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.continuation-option:hover,
.continuation-option:active {
  border-color: var(--accent);
  background: var(--surface-3);
}

.option-thumbnail {
  width: 64px; height: 64px;
  border-radius: 10px;
  flex-shrink: 0;
}

.option-info {
  flex: 1;
  min-width: 0;
}

.option-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.option-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.option-likes {
  display: flex;
  align-items: center;
  gap: 3px;
}

.option-creator-tag {
  background: var(--accent-dark);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  color: var(--accent-light);
}

.option-arrow {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.continuation-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 13px;
}
.continuation-divider::before,
.continuation-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--surface-3);
}

.continuation-prompt-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.continuation-input {
  width: 100%;
  background: var(--surface-2);
  border: 2px solid var(--surface-3);
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}
.continuation-input:focus { border-color: var(--accent); }

.continuation-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.continuation-submit:hover { background: var(--accent-dark); }

.continuation-see-all {
  margin-top: 16px;
  padding: 12px;
  background: none;
  border: 1px solid var(--surface-3);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.continuation-see-all:hover { border-color: var(--accent); color: var(--text); }

/* ===== SUBMITTED ===== */
.submitted-wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  gap: 16px;
}

.submitted-icon {
  position: relative;
  width: 80px; height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.submitted-spinner {
  position: absolute;
  width: 80px; height: 80px;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.submitted-title {
  font-size: 22px;
  font-weight: 700;
}

.submitted-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

.submitted-progress-section {
  width: 100%;
  max-width: 260px;
  margin: 12px 0;
}

.submitted-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.submitted-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}
.submitted-step.done { color: var(--success); }
.submitted-step.active { color: var(--text); }

.step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
  flex-shrink: 0;
}
.step-dot.done { background: var(--success); }
.step-dot.active {
  background: var(--accent);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(124,58,237,0); }
}

.submitted-prompt-preview {
  width: 100%;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px;
  text-align: left;
}

.submitted-prompt-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.submitted-prompt-text {
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,0.8);
  line-height: 1.4;
}

.submitted-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin-top: 8px;
}

.submitted-notify {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.submitted-back-feed {
  padding: 12px;
  background: none;
  border: 1px solid var(--surface-3);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}

/* ===== CREATE ===== */
.create-wrapper {
  padding: 60px 16px 20px;
}

.create-header {
  margin-bottom: 32px;
}
.create-header h2 {
  font-size: 28px;
  font-weight: 700;
}
.create-header p {
  color: var(--text-secondary);
  margin-top: 4px;
}

.create-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.create-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface-2);
  border-radius: 16px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.create-option:hover { border-color: var(--accent); }

.create-option-icon {
  width: 60px; height: 60px;
  background: var(--surface-3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.create-option-text {
  flex: 1;
}
.create-option-text h3 { font-size: 16px; font-weight: 600; }
.create-option-text p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.create-subscreen {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg);
  z-index: 20;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 20px);
}
.create-subscreen.visible {
  display: flex;
}

.create-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}
.create-sub-header h3 { font-size: 18px; font-weight: 600; }
.create-sub-back { cursor: pointer; padding: 4px; }

.create-prompt-body,
.create-upload-body {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.create-prompt-input {
  width: 100%;
  background: var(--surface-2);
  border: 2px solid var(--surface-3);
  border-radius: 14px;
  padding: 16px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  outline: none;
  min-height: 160px;
  transition: border-color 0.2s;
}
.create-prompt-input:focus { border-color: var(--accent); }

.create-style-section { }
.create-style-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.create-style-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.style-btn {
  padding: 8px 16px;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.style-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.create-generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: var(--accent);
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.create-generate-btn:hover { background: var(--accent-dark); }
.create-generate-btn:disabled {
  background: var(--surface-3);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.create-credits-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.upload-dropzone {
  width: 100%;
  aspect-ratio: 9/12;
  border: 2px dashed var(--surface-3);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s;
}
.upload-dropzone:hover { border-color: var(--accent); }
.upload-dropzone p { font-size: 15px; font-weight: 500; color: var(--text); }
.upload-dropzone span { font-size: 12px; }

.upload-title-input {
  width: 100%;
  padding: 14px;
  background: var(--surface-2);
  border: 2px solid var(--surface-3);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.upload-title-input:focus { border-color: var(--accent); }

/* ===== DISCOVER ===== */
.discover-wrapper {
  padding: 16px 16px 20px;
}

.discover-header {
  margin-bottom: 20px;
}
.discover-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.discover-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-secondary);
}
.discover-search input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.discover-section {
  margin-bottom: 24px;
}
.discover-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.discover-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.discover-card {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 9/14;
  cursor: pointer;
}

.discover-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 30px 8px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.discover-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.discover-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.discover-creators {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.discover-creators::-webkit-scrollbar { display: none; }

.discover-creator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 72px;
  cursor: pointer;
}

.discover-creator-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.discover-creator-name {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

/* ===== NOTIFICATIONS ===== */
.notifications-wrapper {
  padding: 16px 16px 20px;
}
.notifications-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
}

.notifications-list {
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface-2);
  cursor: pointer;
}

.notification-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.notification-body { flex: 1; }

.notification-text {
  font-size: 14px;
  line-height: 1.4;
}
.notification-text strong { font-weight: 600; }

.notification-time {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.notification-unread {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}

/* ===== PROFILE ===== */
.profile-wrapper {
  padding: 40px 16px 20px;
}

.profile-header-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.profile-avatar-large {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  margin-bottom: 12px;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
}

.profile-bio {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile-stat strong { font-size: 18px; }
.profile-stat span { font-size: 12px; color: var(--text-secondary); }

.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--surface-3);
  margin-bottom: 16px;
}

.profile-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.profile-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px;
}

.profile-grid-item {
  aspect-ratio: 9/14;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.profile-grid-likes {
  position: absolute;
  bottom: 4px; left: 4px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ===== TREE VIEW MODAL ===== */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal.visible { display: flex; }

.modal-content {
  width: 100%;
  max-width: 430px;
  max-height: 80vh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-close { cursor: pointer; padding: 4px; }

.tree-view {
  padding-left: 0;
}

.tree-node {
  margin-bottom: 6px;
}

.tree-node-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}
.tree-node-content:hover { background: var(--surface-3); }
.tree-node-content.current {
  border-left-color: var(--accent);
  background: var(--surface-3);
}

.tree-node-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.tree-node-title {
  flex: 1;
  font-size: 13px;
}

.tree-node-likes {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
}

.tree-children {
  padding-left: 20px;
  border-left: 1px solid var(--surface-3);
  margin-left: 15px;
  margin-top: 4px;
}

/* ===== SHARE MODAL ===== */
.share-options {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.share-option-icon {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-option span { font-size: 12px; color: var(--text-secondary); }

.share-link-section {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px;
}

.share-link-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.share-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-3);
  border-radius: 8px;
  padding: 10px;
}

.share-link-box span {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-copy-btn {
  padding: 6px 12px;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(17,17,17,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 90;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
  padding: 4px 12px;
}
.nav-item.active { color: var(--text); }
.nav-item span { font-size: 10px; }

.nav-item.create-btn {
  position: relative;
  top: -4px;
}

.create-icon {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.nav-badge {
  position: absolute;
  top: -2px; right: 4px;
  width: 16px; height: 16px;
  background: var(--danger);
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

/* ===== DESKTOP FRAME ===== */
@media (min-width: 500px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
  }
  #app {
    height: 812px;
    border-radius: 40px;
    border: 3px solid #333;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
    position: relative;
  }
  .bottom-nav {
    border-radius: 0 0 37px 37px;
  }
}
