/* Custom Styles */
:root {
  --primary-color: #4f46e5;
  --secondary-color: #818cf8;
  --accent-color: #6366f1;
  --background-color: #f9fafb;
  --text-color: #1f2937;
  --light-text-color: #6b7280;
  --border-color: #e5e7eb;
  --ios-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  --card-radius: 16px;
  --button-radius: 12px;
}

body {
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Device Frame Styles */
.device-frame {
  width: 375px;
  height: 812px;
  background-color: white;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.device-frame iframe, 
.fullscreen-device iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Make sure app content is scrollable */
.app-content {
  height: calc(100% - 127px); /* Status bar (44px) + Tab bar (83px) */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
}

/* Status bar styling */
.status-bar {
  height: 44px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Tab bar styling */
.tab-bar {
  height: 83px;
  padding-bottom: 30px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: white;
  border-top: 1px solid #e5e7eb;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--light-text-color);
  font-size: 10px;
  flex: 1;
  text-align: center;
  padding: 8px 0;
  transition: color 0.2s ease;
}

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

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

/* Card Components */
.bot-card {
  background-color: white;
  border-radius: var(--card-radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--ios-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bot-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.community-card {
  background-color: white;
  border-radius: var(--card-radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--ios-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.community-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.resource-card {
  background-color: white;
  border-radius: var(--card-radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--ios-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Chat Components */
.chat-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  margin-bottom: 8px;
  box-shadow: var(--ios-shadow);
}

.chat-bubble.user {
  background-color: var(--primary-color);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-bubble.bot {
  background-color: #e5e7eb;
  color: var(--text-color);
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.input-box {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 24px;
  padding: 8px 16px;
  margin: 16px;
  box-shadow: var(--ios-shadow);
}

/* Goal Components */
.goal-card {
  background-color: white;
  border-radius: var(--card-radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--ios-shadow);
}

.progress-bar {
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Community Components */
.community-list-item {
  background-color: white;
  border-radius: var(--card-radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--ios-shadow);
}

/* Profile Components */
.profile-header {
  background-color: white;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--ios-shadow);
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 3px solid white;
  box-shadow: var(--ios-shadow);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 0 16px;
}

.back-button {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--primary-color);
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: white;
  border-bottom: 1px solid var(--border-color);
}

.header-title {
  font-size: 18px;
  font-weight: 600;
}

/* Button Styles */
.ios-button {
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--button-radius);
  padding: 12px 20px;
  font-weight: 600;
  font-size: 16px;
  transition: background-color 0.2s ease;
}

.ios-button:active {
  background-color: var(--secondary-color);
}

.ios-button-secondary {
  background-color: #e5e7eb;
  color: var(--text-color);
  border-radius: var(--button-radius);
  padding: 12px 20px;
  font-weight: 600;
  font-size: 16px;
  transition: background-color 0.2s ease;
}

.ios-button-secondary:active {
  background-color: #d1d5db;
}

/* Floating Action Button */
.floating-button {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

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

/* Responsive Adjustments */
@media (max-width: 640px) {
  .device-frame {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    margin: 0;
    border: none;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  width: 90%;
  max-width: 350px;
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal.active .modal-content {
  transform: translateY(0);
}

/* Animation for success checkmark */
@keyframes checkmark-appear {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#payment-success-modal .fa-check {
  animation: checkmark-appear 0.5s ease-out forwards;
}

/* Auth Page Styles */
.auth-form {
  transition: opacity 0.3s, transform 0.3s;
  opacity: 0;
  transform: translateY(10px);
  display: none;
}

.auth-form.active {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

.auth-form.hidden {
  display: none;
}

/* Social Login Buttons Animation */
.grid button {
  transition: all 0.2s;
}

.grid button:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.grid button:active {
  transform: translateY(0);
}

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

.animate-spin {
  animation: spin 1s linear infinite;
} 