:root {
  --bg-0: #000000;
  --bg-1: #121212;
  --fg: #ffffff;
  --muted: #8e8e8e;
  --brand-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --brand-1: #ff0050; /* TikTok Red */
  --brand-2: #00f2ea; /* TikTok Cyan */
  --accent: #fe2c55;
  --success: #00c853;
  --error: #ff3b30;
  --card-bg: #1c1c1e;
  --border: #2c2c2e;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-0);
  color: var(--fg);
  font-family: var(--font-main);
  display: flex;
  justify-content: center;
}

/* Mobile App Container Simulation */
.page {
  width: 100%;
  max-width: 480px; /* Mobile width */
  min-height: 100vh;
  background: var(--bg-0);
  position: relative;
  padding: 0 0 80px 0; /* Space for bottom nav or footer */
  display: flex;
  flex-direction: column;
}

/* Background Effects */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 0%, rgba(255, 0, 80, 0.15), transparent 50%),
              radial-gradient(circle at 0% 100%, rgba(0, 242, 234, 0.1), transparent 40%);
  pointer-events: none;
}

/* Header / Top Bar */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.5px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand {
  padding: 0 20px;
  margin-bottom: 20px;
}

.tag {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

/* Landing View */
#landing-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  gap: 30px;
}

.header-cta {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 10px;
}

.card {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  text-align: center;
}

.subtitle {
  color: var(--muted);
  font-size: 15px;
  text-align: center;
  margin-bottom: 24px;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.phone-row {
  display: flex;
  gap: 12px;
}

input, select, .select, .input-area {
  width: 100%;
  padding: 16px;
  background: #2c2c2e;
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

input:focus, select:focus, .select:focus, .input-area:focus {
  background: #3a3a3c;
  box-shadow: 0 0 0 2px var(--brand-1);
}

/* Buttons */
.button {
  width: 100%;
  padding: 16px;
  border-radius: 30px; /* Pill shape */
  border: none;
  background: var(--brand-1);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button:active {
  transform: scale(0.98);
}

.button.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.button.small {
  padding: 8px 16px;
  font-size: 13px;
  width: auto;
  min-height: 32px;
}

/* Profile View */
.profile-card {
  padding: 20px;
}

.profile-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Instagram-style Profile Header */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #bc1888);
  padding: 3px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
}

.profile-stats {
  display: flex;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-weight: 700;
  font-size: 18px;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

/* Applications List */
.app-item {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Job Cards (Tinder/Instagram style) */
.rec-job-item {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: relative;
}

.rec-job-header {
  padding: 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.rec-job-title {
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.rec-job-company {
  color: var(--brand-2);
  font-weight: 600;
  font-size: 14px;
}

.rec-job-details {
  padding: 0 16px 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rec-job-detail-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  color: #fff;
}

.rec-job-actions {
  display: flex;
  padding: 16px;
  gap: 12px;
  border-top: 1px solid var(--border);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--card-bg);
  width: 100%;
  max-width: 400px;
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
}

/* Utilities */
.hidden { display: none !important; }
.error { color: var(--error); font-size: 12px; margin-top: 4px; }
.form-note { color: var(--muted); font-size: 12px; text-align: center; }

/* Expandable Section */
.expand-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--brand-2);
  padding: 12px;
  cursor: pointer;
  font-weight: 600;
}

.hidden-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.hidden-fields.expanded {
  max-height: 1200px;
  margin-top: 16px;
}

@media (min-width: 768px) {
  /* On desktop, keep the mobile app look centered */
  body {
    background: #000;
  }
  .page {
    border-left: 1px solid #333;
    border-right: 1px solid #333;
  }
}

/* Spinner */
.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--brand-1);
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto;
}

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