@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;600;700;800;900&display=swap');

:root {
  --bg-main: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(51, 65, 85, 0.8);
  --border-color: rgba(255, 255, 255, 0.1);
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.3);
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  direction: rtl;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
}

#app-container {
  width: 100%;
  max-width: 480px;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 90px;
}

/* Header */
.app-header {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Views & Cards */
.view {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.view.active {
  display: flex;
}

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

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Forms & Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

select, input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
}

select:focus, input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

/* Buttons */
.btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  background: rgba(51, 65, 85, 0.7);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(71, 85, 105, 0.9);
}

/* Student Stats & Tier */
.tier-badge-container {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.4);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.tier-emoji {
  font-size: 2.5rem;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* Transcript Output Box */
.transcript-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-family);
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #e2e8f0;
}

/* Pending Banner */
.alert-banner {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--accent-gold);
  color: #fbbf24;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  gap: 3px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-item.active {
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
}

.nav-icon {
  font-size: 1.25rem;
}
