/* Shared styles for Edu News Daily prototypes */

:root {
  /* Colors */
  --color-primary: #3B82F6;
  --color-primary-dark: #2563EB;
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-bg: #FFFFFF;
  --color-bg-secondary: #F9FAFB;
  --color-text: #111827;
  --color-text-secondary: #6B7280;
  --color-text-tertiary: #9CA3AF;
  --color-border: #E5E7EB;
  
  /* Dark mode colors */
  --color-dark-bg: #1F2937;
  --color-dark-bg-secondary: #111827;
  --color-dark-text: #F3F4F6;
  --color-dark-text-secondary: #D1D5DB;
  --color-dark-border: #374151;
  
  /* Difficulty levels */
  --color-beginner: #10B981;
  --color-intermediate: #F59E0B;
  --color-advanced: #EF4444;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
  
  /* Typography */
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  
  /* iPhone 15 Pro dimensions */
  --iphone-width: 393px;
  --iphone-height: 852px;
  --status-bar-height: 44px;
  --tab-bar-height: 83px;
  --safe-area-top: 44px;
  --safe-area-bottom: 34px;
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* iPhone frame styling */
.iphone-frame {
  width: var(--iphone-width);
  height: var(--iphone-height);
  background: #000;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* iOS status bar */
.ios-status-bar {
  height: var(--status-bar-height);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 50;
}

.status-bar-left,
.status-bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Bottom tab bar */
.bottom-tab-bar {
  height: var(--tab-bar-height);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: var(--spacing-xs);
  padding-bottom: var(--safe-area-bottom);
  position: sticky;
  bottom: 0;
  z-index: 50;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--spacing-xs);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--font-size-xs);
  font-weight: 500;
  min-width: 44px;
  transition: color 0.2s;
}

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

.tab-item i {
  font-size: 24px;
}

/* Common components */
.card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px var(--spacing-xs);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-beginner {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-beginner);
}

.badge-intermediate {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-intermediate);
}

.badge-advanced {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-advanced);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  min-height: 48px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

/* Progress bar */
.progress-bar {
  height: 12px;
  background: var(--color-bg-secondary);
  border-radius: 999px;
  overflow: hidden;
}

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

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease;
}

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

/* Utility classes */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--color-primary);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-success {
  color: var(--color-success);
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

