html, body {
  margin: 0; padding: 0;
  background: black;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: white;
}

#app {
  height: 100%;
  width: 100%;
  position: relative;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.video-container {
  height: 100%;
  width: 100vw;
  position: relative;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: pointer;
}

video {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  background: black;
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  z-index: 10;
}

.video-metadata {
  margin-bottom: 15px;
}

.video-title-container {
  position: relative;
  margin-bottom: 8px;
}

.video-title {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  transition: max-height 0.3s ease-out;
  word-break: break-word;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.profile-pic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.author-pubkey {
  font-size: 0.8rem;
  opacity: 0.7;
}

.post-date {
  font-size: 0.8rem;
  opacity: 0.7;
}

.video-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
}

.control-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  color: white;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.control-btn.active {
  background: #00ff90;
}

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

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #00ff90;
  border-radius: 2px;
}

#loading {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  z-index: 100;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #00ff90;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.toast.show {
  opacity: 1;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .video-overlay {
    padding: 15px;
  }
  .video-title {
    font-size: 1rem;
  }
  .author-name {
    font-size: 0.8rem;
  }
  .author-pubkey, .post-date {
    font-size: 0.7rem;
  }
  .control-btn {
    padding: 10px;
    font-size: 1rem;
    width: 40px;
    height: 40px;
  }
}

.load-more-container {
  height: 100vh;
  width: calc(100vw - 280px);
  position: relative;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: pointer;
}

.load-more-button {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 20px 40px;
  font-size: 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.load-more-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.load-more-button .material-symbols-rounded {
  font-size: 1.4rem;
}

.load-more-button.loading {
  opacity: 0.7;
  cursor: wait;
}

.load-more-button.loading .material-symbols-rounded {
  animation: spin 1s linear infinite;
}

.show-more-btn {
  background: none;
  border: none;
  color: #00ff90;
  padding: 4px 0;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 4px;
  display: block;
}

.show-more-btn:hover {
  text-decoration: underline;
}

.share-btn {
  margin-left: 8px;
}

.share-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(28, 28, 30, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px 16px 0 0;
  padding: 16px 0 0 0;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Add max-width for tablet and desktop */
@media (min-width: 768px) {
  .share-sheet {
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    max-width: 420px;
  }
  
  .share-sheet.show {
    transform: translateX(-50%) translateY(0) !important;
  }
}

.share-sheet.show {
  transform: translateY(0);
}

.share-sheet-header {
  text-align: center;
  padding: 8px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.share-sheet-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.share-options {
  display: flex;
  gap: 12px;
  padding: 8px 16px 24px 16px;
  margin-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}

.share-options::-webkit-scrollbar {
  display: none;
}

.share-sheet-cancel {
  border-top: 1px solid rgba(255,255,255,0.1);
  background: none;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.share-sheet-cancel>.close>.share-option-label {
  font-size: 16px;
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  min-width: 72px;
  scroll-snap-align: start;
}

.share-option-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: transform 0.2s;
}

.share-option:hover .share-option-icon {
  transform: scale(1.1);
}

.share-option .material-symbols-rounded {
  font-size: 24px;
  color: white;
}

.share-option-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Share option colors */
.share-option[data-type="copy"] .share-option-icon {
  background: #666;
}

.share-option[data-type="sms"] .share-option-icon {
  background: #00ff90;
}

.share-option[data-type="email"] .share-option-icon {
  background: #2196f3;
}

.share-option[data-type="more"] .share-option-icon {
  background: #666;
}

.share-option.close {
  width: 100%;
  min-width: 0;
  margin: 0;
  border-radius: 0;
  background: rgba(255,255,255,0.05);
  color: #ff4444;
  font-weight: 500;
  font-size: 16px;
  padding: 18px 0;
  justify-content: center;
  flex-direction: row;
  border: none;
  box-shadow: none;
}

.share-option.close .share-option-icon {
  display: none;
}

.share-option.close .material-symbols-rounded {
  margin-right: 8px;
  font-size: 20px;
}

.share-sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 999;
}

.share-sheet-backdrop.show {
  opacity: 1;
}

@media (max-width: 480px) {
  .share-options {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Page Styles */
.page {
  display: none;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

.page.active {
  display: block;
}

@media (min-width: 768px) {
  .page {
    width: calc(100% - 280px);
  }
}

.page h2 {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 600;
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.modal-backdrop.show {
  opacity: 1;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(28, 28, 30, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 420px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
}

.modal.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-content {
  color: white;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.modal-tab {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.modal-form {
  display: none;
}

.modal-form.active {
  display: block;
}

.modal-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: white;
  font-size: 16px;
  margin-bottom: 16px;
}

.modal-input:focus {
  outline: none;
  border-color: #00ff90;
}

.modal-button {
  width: 100%;
  background: #00ff90;
  border: none;
  border-radius: 8px;
  padding: 12px;
  color: black;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-button:hover {
  background: #00e680;
}

.modal-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.new-keys-info {
  margin-bottom: 24px;
  line-height: 1.5;
}

.new-keys-info p {
  margin: 8px 0;
}

.warning {
  color: #ff4444;
  font-size: 14px;
}

.keys-display {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  word-break: break-all;
}

.keys-display p {
  margin: 8px 0;
}

/* Profile Page Styles */
.profile-header {
  padding: 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  margin-bottom: 24px;
}

.profile-picture {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  object-fit: cover;
  border: 3px solid #00ff90;
}

.profile-name {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-about {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  line-height: 1.5;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

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

.stat-value {
  font-size: 20px;
  font-weight: 600;
  color: #00ff90;
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.profile-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.profile-button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.profile-button .material-symbols-rounded {
  font-size: 20px;
}

.profile-content {
  padding: 0 24px;
}

.profile-section {
  margin-bottom: 32px;
}

.profile-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.profile-placeholder {
  text-align: center;
  padding: 48px 24px;
  color: rgba(255, 255, 255, 0.7);
}

.profile-placeholder .material-symbols-rounded {
  font-size: 48px;
  margin-bottom: 16px;
  color: #00ff90;
}

@media (max-width: 768px) {
  .modal {
    width: 95%;
    padding: 20px;
  }
  
  .profile-header {
    padding: 20px;
  }
  
  .profile-picture {
    width: 100px;
    height: 100px;
  }
  
  .profile-name {
    font-size: 20px;
  }
  
  .profile-stats {
    gap: 16px;
  }
  
  .stat-value {
    font-size: 18px;
  }

  .load-more-container {
    width: 100%;
  }
}

/* App Header Styles */
.app-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 16px 24px;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  padding-left: 48px;
  color: white;
  font-size: 16px;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #00ff90;
  background: rgba(255, 255, 255, 0.15);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.search-results {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  overflow-y: auto;
}

.search-results.show {
  display: block;
}

.search-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.search-feed .video-container {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.search-feed .video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.search-result-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.search-result-content {
  flex: 1;
}

.search-result-title {
  font-weight: 500;
  margin-bottom: 4px;
}

.search-result-author {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.no-results {
  padding: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .app-header {
    padding: 12px 16px;
  }
  
  .search-input {
    padding: 10px 16px;
    padding-left: 40px;
    font-size: 14px;
  }
  
  .search-icon {
    left: 12px;
  }
}

@media (min-width: 768px) {
  .search-results {
    left: 280px;
  }
  
  .search-feed {
    max-width: 800px;
    margin: 0 auto;
  }
} 