:root {
  --ios-bg: #f2f2f7;
  --ios-card: rgba(255, 255, 255, 0.8);
  --ios-text: #000000;
  --ios-text-secondary: #8e8e93;
  --ios-accent: #a52a2a; /* Meat/Bordeaux Red */
  --ios-gold: #d4af37;
  --ios-blue: #007aff;
  --ios-radius: 20px;
  --ios-blur: blur(20px);
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--ios-bg);
  color: var(--ios-text);
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

#app-container {
  width: 100%;
  max-width: 430px; /* iPhone 15 Pro Max width approximation */
  min-height: 100vh;
  position: relative;
  background-color: var(--ios-bg);
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  padding: 60px 20px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 242, 247, 0.8);
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
}

.header h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header p {
  margin: 5px 0 0;
  color: var(--ios-text-secondary);
  font-size: 15px;
}

/* Content Area */
.content {
  padding: 0 20px 100px;
  flex: 1;
}

/* Cards */
.card {
  background: var(--ios-card);
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  border-radius: var(--ios-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease;
}

.card:active {
  transform: scale(0.98);
}

.card-title {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--ios-text-secondary);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.points-display {
  font-size: 48px;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.points-display .unit {
  font-size: 20px;
  color: var(--ios-text-secondary);
  font-weight: 500;
}

/* List Items */
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

.list-item:last-child {
  border-bottom: none;
}

.item-info h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}

.item-info p {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--ios-text-secondary);
}

.item-action {
  background: var(--ios-bg);
  color: var(--ios-accent);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.item-action:disabled {
  opacity: 0.5;
  color: var(--ios-text-secondary);
}

/* Tabs */
.tab-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 430px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  display: flex;
  justify-content: space-around;
  padding: 10px 0 30px; /* Extra bottom padding for "Home Indicator" area */
  border-top: 0.5px solid rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ios-text-secondary);
  cursor: pointer;
  flex: 1;
}

.tab-item.active {
  color: var(--ios-accent);
}

.tab-icon {
  font-size: 24px;
}

.tab-label {
  font-size: 10px;
  font-weight: 500;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Quick Actions Grid */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}

.action-btn {
  background: var(--ios-card);
  border: none;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.action-btn .icon {
  font-size: 28px;
  color: var(--ios-accent);
}

.action-btn span {
  font-weight: 600;
  font-size: 14px;
}
/* Auth View Styles */
#auth-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ios-bg);
    z-index: 5000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 350px;
}

.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container h1 {
    margin: 10px 0 0;
    font-size: 32px;
}

.logo-container p {
    color: var(--ios-text-secondary);
    margin: 5px 0 0;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--ios-text-secondary);
    padding-left: 5px;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    font-size: 16px;
    outline: none;
}

.primary-btn {
    width: 100%;
    padding: 15px;
    background: var(--ios-accent);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 17px;
    font-weight: 600;
    margin-top: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(165, 42, 42, 0.3);
}

.auth-toggle {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--ios-text-secondary);
}

.auth-toggle a {
    color: var(--ios-accent);
    text-decoration: none;
    font-weight: 600;
}

/* Secondary Button for Logout/Special etc */
.secondary-btn {
    width: 100%;
    padding: 12px;
    background: #e5e5ea;
    color: #333;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
}
