/* Profile Page Styles */
:root {
  --bg: #0d0f13;
  --card: #141821;
  --card-2: #1a1f27;
  --text: #e8eaed;
  --text-dim: #98a2b3;
  --primary: #2ce58d;
  --primary-2: #2ad1b8;
  --ring: rgba(44, 229, 141, 0.35);
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  min-height: 100%;
  padding-top: calc(20px + var(--safe-top));
  padding-bottom: calc(95px + var(--safe-bottom));
}

/* Header */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: calc(var(--safe-top)) 16px 12px 16px;
  background: linear-gradient(180deg, rgba(13,15,19,0.95), rgba(13,15,19,0.6) 80%, rgba(13,15,19,0));
  backdrop-filter: saturate(150%) blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
}

.app-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-actions { 
  display: flex; 
  gap: 8px; 
}

.icon-btn {
  width: 32px; 
  height: 32px;
  display: grid; 
  place-items: center;
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset;
  cursor: pointer;
  font-size: 16px;
}

/* Membership Card */
.membership-card {
  margin: 16px 16px 24px 16px;
  background: linear-gradient(135deg, #124038 0%, #1a5a4a 50%, #0e2c23 100%);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

.membership-header {
  padding: 12px 16px 8px;
  display: flex;
  justify-content: flex-end;
}

.membership-label {
  background: rgba(44, 229, 141, 0.15);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid rgba(44, 229, 141, 0.25);
}

.user-info {
  padding: 0 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-badge {
  font-size: 16px;
  font-weight: 800;
  color: #0c1b17;
}

.user-details {
  flex: 1;
}

.username {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.user-id {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.score {
  font-weight: 600;
  color: var(--primary);
}

.membership-visual {
  position: absolute;
  right: 0;
  top: -20px;
  width: 120px;
  height: 120px;
}

.card-bg {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(44, 229, 141, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.membership-status {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.status-icon {
  color: var(--text-dim);
  font-size: 16px;
}

.status-text {
  color: var(--text-dim);
  font-size: 14px;
}

/* Menu List */
.menu-list {
  margin: 0 16px;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background-color 0.2s;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-2);
  border-radius: 10px;
  font-size: 18px;
  margin-right: 12px;
  flex-shrink: 0;
}

.menu-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
}

.menu-badge {
  background: rgba(44, 229, 141, 0.15);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  margin-right: 8px;
}

.menu-arrow {
  color: var(--text-dim);
  font-size: 18px;
  font-weight: 300;
}

/* Tabbar */
.tabbar {
  position: fixed; 
  left: 0; 
  right: 0; 
  bottom: 0;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: rgba(13,15,19,.85);
  backdrop-filter: blur(8px) saturate(140%);
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.tab {
  text-decoration: none; 
  color: var(--text-dim); 
  font-size: 11px; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px; 
  padding: 8px 4px; 
  border-radius: 16px;
  transition: all 0.2s ease;
}

.tab.active { 
  color: var(--text); 
  background: rgba(255,255,255,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tab .ico { 
  width: 28px; 
  height: 28px; 
  border-radius: 10px; 
  display: grid; 
  place-items: center; 
  background: var(--card); 
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset;
  transition: all 0.2s ease;
}

.tab.active .ico {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #0c1b17;
  transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 375px) {
  .membership-card {
    margin: 12px;
  }
  
  .menu-list {
    margin: 0 12px;
  }
  
  .user-info {
    padding: 0 12px 12px;
  }
}