* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
  font-size: 14px;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.auth-container {
  background: white;
  border-radius: 16px;
  padding: 30px 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-header {
  text-align: center;
  margin-bottom: 25px;
}

.auth-header h1 {
  font-size: 22px;
  color: #333;
  margin-bottom: 6px;
}

.auth-header p {
  color: #666;
  font-size: 13px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 15px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.tab-btn.active {
  color: #667eea;
  font-weight: 600;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #667eea;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.3s;
  background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  background: white;
}

.form-group small {
  color: #999;
  font-size: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
}

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

.btn-secondary {
  background: #f5f7fa;
  color: #333;
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.btn-danger {
  background: #ff4757;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.auth-footer a {
  color: #667eea;
  text-decoration: none;
  font-size: 13px;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 70px;
}

.app-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 15px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: none;
}

.app-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.app-header h1 {
  font-size: 18px;
  font-weight: 600;
}

.app-header-user {
  font-size: 12px;
  opacity: 0.9;
}

.app-header-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.header-stat {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.header-stat .value {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 2px;
}

.header-stat .label {
  font-size: 11px;
  opacity: 0.9;
}

.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f8f9fc;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 15px rgba(0,0,0,0.08);
  z-index: 100;
  border-top: 1px solid #e8e8e8;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 12px;
  color: #999;
  text-decoration: none;
  font-size: 11px;
  transition: all 0.3s;
  position: relative;
}

.nav-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: #999;
  transition: all 0.3s;
}

.nav-item.active {
  color: #667eea;
}

.nav-item.active .nav-icon svg {
  stroke: #667eea;
  stroke-width: 2.5;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0 0 3px 3px;
}

.page {
  display: none;
  padding: 15px;
}

.page.active {
  display: block;
}

.page-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title .action-btn {
  font-size: 13px;
  padding: 6px 14px;
}

.banner-container {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
}

.banner-container.hidden {
  display: none;
}

.banner-wrapper {
  display: flex;
  transition: transform 0.3s ease;
}

.banner-slide {
  min-width: 100%;
  aspect-ratio: 16/9;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.banner-dot.active {
  background: white;
}

.card {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid #e8ecf0;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 6px;
  margin-right: 8px;
}

.card-icon svg {
  width: 16px;
  height: 16px;
  stroke: white;
  stroke-width: 2;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat-item {
  text-align: center;
  padding: 12px 5px;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
  border-radius: 10px;
  transition: transform 0.2s;
}

.stat-item:active {
  transform: scale(0.95);
}

.stat-item .value {
  font-size: 18px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 4px;
}

.stat-item .label {
  font-size: 11px;
  color: #888;
}

.commission-rate-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 10px;
}

.rate-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8f9ff;
  padding: 6px 12px;
  border-radius: 20px;
}

.rate-label {
  font-size: 12px;
  color: #666;
}

.rate-value {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
}

.earnings-row {
  display: flex;
  justify-content: space-around;
  padding: 15px 0;
  gap: 10px;
}

.earnings-col {
  text-align: center;
  flex: 1;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
  border-radius: 10px;
  padding: 15px 10px;
}

.earnings-col .value {
  font-size: 22px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 4px;
}

.earnings-col .label {
  font-size: 12px;
  color: #888;
}

.notice-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

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

.notice-item h4 {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.notice-item span {
  color: #999;
  font-size: 11px;
}

.notice-item-wrapper {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #f0f0f0;
}

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

.notice-item-content {
  background: #f8f9fc;
  padding: 12px 0;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.notice-item-content h4 {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.notice-item-content span {
  color: #999;
  font-size: 11px;
}

.notice-item-delete {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: #ff4757;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.unread-badge {
  background: #ff4757;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.unread-dot {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #ff4757;
  border-radius: 50%;
}

.card-header {
  display: flex;
  align-items: center;
}

.card-header.clickable {
  cursor: pointer;
}

.card-header.clickable:hover {
  background: #f9f9f9;
}

.card-arrow {
  margin-left: auto;
  font-size: 18px;
  color: #999;
}

.back-btn {
  font-size: 24px;
  margin-right: 10px;
  cursor: pointer;
  color: #667eea;
}

.withdrawals-container {
  padding: 10px;
}

.withdrawal-card {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid #e8ecf0;
}

.withdrawal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.withdrawal-amount {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.withdrawal-info .info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.withdrawal-info .info-label {
  color: #999;
  font-size: 13px;
}

.withdrawal-info .info-value {
  color: #333;
  font-size: 13px;
}

.top-badge {
  background: #ff9500;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

.type-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

.type-badge.type-news {
  background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
}

.type-badge.type-tutorial {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-warning {
  background: #ff9500;
  color: white;
  border: none;
}

.btn-warning:hover {
  background: #e68600;
}

.kefu-btn {
  position: fixed;
  right: 15px;
  bottom: 80px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  cursor: pointer;
  z-index: 100;
  transition: transform 0.3s;
}

.kefu-btn:hover {
  transform: scale(1.1);
}

.kefu-btn span {
  font-size: 24px;
}

.kefu-modal-content {
  max-width: 300px;
  text-align: center;
}

.kefu-qrcode-container {
  padding: 20px;
}

.kefu-qrcode-container img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.kefu-qrcode-container p {
  color: #666;
  font-size: 14px;
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.platform-card {
  background: #f8f9fc;
  border-radius: 10px;
  padding: 15px;
  border: 1px solid #e8ecf0;
  cursor: pointer;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  position: relative;
}

.platform-card:active {
  transform: scale(0.98);
}

.platform-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 8px;
  width: 100%;
}

.platform-tag {
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.platform-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.platform-logo-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.platform-header h3 {
  font-size: 14px;
  color: #333;
  margin: 0;
  text-align: center;
}

.platform-info {
  margin-bottom: 8px;
}

.platform-info p {
  margin-bottom: 4px;
  font-size: 12px;
  color: #666;
  display: flex;
  justify-content: space-between;
}

.platform-info strong {
  color: #667eea;
}

.copyable-code {
  cursor: pointer;
  transition: background 0.2s;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 6px;
}

.copyable-code:hover {
  background: #f0f2ff;
}

.copyable-code:active {
  background: #e0e4ff;
}

.platform-rules {
  background: #f8f9fa;
  padding: 8px;
  border-radius: 6px;
  font-size: 11px;
  color: #666;
  margin-bottom: 8px;
  white-space: pre-wrap;
  max-height: 80px;
  overflow-y: auto;
}

.rules-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.rules-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.2s;
}

.rules-img:hover {
  transform: scale(1.05);
}

.platform-actions {
  display: flex;
  gap: 6px;
}

.platform-actions .btn-primary,
.platform-actions .btn-secondary {
  flex: 1;
  padding: 6px 8px;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
}

.team-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  padding: 0 15px;
}

.team-tab {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  background: #f8f9fc;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

.team-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
}

.member-card {
  background: #f8f9fc;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #e8ecf0;
}

.member-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.member-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.member-time {
  font-size: 11px;
  color: #999;
}

.member-info {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #666;
}

.member-info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.anchor-card {
  background: #f8f9fc;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #e8ecf0;
}

.anchor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.anchor-id {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.anchor-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
}

.anchor-count {
  font-size: 12px;
  color: #667eea;
  font-weight: 500;
}

.anchor-item {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid #e8ecf0;
  cursor: pointer;
  transition: all 0.2s;
}

.anchor-item:active {
  transform: scale(0.98);
}

.anchor-item:last-child {
  margin-bottom: 0;
}

.anchor-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8ecf0;
}

.anchor-id {
  font-size: 14px;
  color: #333;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.anchor-id::before {
  content: '';
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
}

.anchor-time {
  font-size: 11px;
  color: #999;
}

.anchor-earnings {
  font-size: 16px;
  color: #667eea;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
  padding: 4px 10px;
  border-radius: 20px;
}

.anchor-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.anchor-stats .stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: white;
  border-radius: 8px;
}

.anchor-stats .stat-row .label {
  font-size: 11px;
  color: #888;
}

.anchor-stats .stat-row .value {
  font-size: 13px;
  color: #333;
  font-weight: 600;
}

.earnings-summary-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.earnings-summary-item {
  text-align: center;
}

.earnings-summary-item .label {
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
}

.earnings-summary-item .value {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.earnings-summary-item .sub {
  font-size: 11px;
  color: #667eea;
  margin-top: 2px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-approved {
  background: #d4edda;
  color: #155724;
}

.status-rejected {
  background: #f8d7da;
  color: #721c24;
}

.qrcode-section {
  text-align: center;
  padding: 20px 0;
}

.qrcode-section img {
  width: 180px;
  height: 180px;
  border: 3px solid #667eea;
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.2s;
}

.qrcode-section img:hover {
  transform: scale(1.02);
}

.qrcode-section img:active {
  transform: scale(0.98);
}

.qrcode-section p {
  color: #666;
  font-size: 13px;
}

.copy-section {
  margin-top: 15px;
}

.copy-item {
  margin-bottom: 12px;
}

.copy-item label {
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
  display: block;
}

.copy-box {
  display: flex;
  gap: 8px;
}

.copy-box input {
  flex: 1;
  padding: 10px 12px;
  background: #f5f7fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 12px;
  font-family: monospace;
}

.btn-copy {
  padding: 10px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.material-item {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.material-item img {
  max-width: 100%;
  max-height: 100px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.material-item h4 {
  font-size: 12px;
  color: #333;
  margin-bottom: 3px;
}

.material-item p {
  font-size: 11px;
  color: #666;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px 16px 0 0;
  padding: 20px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-content.modal-lg {
  max-width: 500px;
  margin: 0 auto;
}

.scrollable-form {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 5px;
}

.scrollable-form::-webkit-scrollbar {
  width: 4px;
}

.scrollable-form::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.scrollable-form::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.scrollable-form::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

.children-checkbox-container {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  background: #fafafa;
}

.children-checkbox-container label {
  display: flex;
  align-items: center;
  padding: 8px;
  margin: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.children-checkbox-container label:hover {
  background: #f0f0f0;
}

.children-checkbox-container input[type="checkbox"] {
  margin-right: 10px;
  width: 16px;
  height: 16px;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
  font-size: 16px;
  color: #333;
}

.modal-close {
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 220px;
  background: #2c3e50;
  color: white;
  padding: 15px 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.admin-brand {
  padding: 0 15px 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 15px;
}

.admin-brand h2 {
  font-size: 16px;
  font-weight: 600;
}

.admin-menu {
  list-style: none;
}

.admin-menu li a {
  display: block;
  padding: 10px 15px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s;
}

.admin-menu li a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.admin-menu li a.active {
  background: #667eea;
  color: white;
}

.admin-main {
  flex: 1;
  margin-left: 220px;
  background: #f5f7fa;
}

.admin-header {
  background: #f8f9fc;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e8ecf0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-header h1 {
  font-size: 18px;
  color: #333;
}

.admin-content {
  padding: 20px;
}

.dashboard-welcome {
  margin-bottom: 25px;
}

.dashboard-welcome h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 5px;
}

.dashboard-welcome p {
  color: #999;
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.stat-card {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #e8ecf0;
  transition: transform 0.3s;
}

.stat-card:active {
  transform: scale(0.98);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-card-users .stat-icon { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-card-new .stat-icon { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.stat-card-anchors .stat-icon { background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%); }
.stat-card-pending .stat-icon { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-card-withdraw .stat-icon { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-card-total .stat-icon { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}

.dashboard-section {
  margin-top: 20px;
}

.dashboard-card {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e8ecf0;
}

.dashboard-card h3 {
  font-size: 16px;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.quick-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}

.action-bar {
  display: flex;
  gap: 8px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-group {
  flex: 1;
}

.table-container {
  overflow-x: auto;
  background: #f8f9fc;
  border-radius: 10px;
  border: 1px solid #e8ecf0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.data-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #666;
  font-size: 12px;
}

.data-table td {
  color: #333;
}

@media (min-width: 769px) {
  .app-container {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    min-height: 100vh;
  }
  
  .app-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .admin-content {
    padding: 15px;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #999;
}

.download-content {
  text-align: center;
}

.download-qrcode {
  margin-bottom: 20px;
}

.download-qrcodes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.download-qrcode-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s;
}

.download-qrcode-img:hover {
  transform: scale(1.05);
}

.download-qrcode p {
  font-size: 13px;
  color: #666;
}

.download-link-section {
  text-align: left;
}

.download-link-section label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.platform-action-bar {
  padding: 10px 0 5px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
  margin-top: 10px;
}

.platform-summary-header {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  margin-bottom: 10px;
}

.summary-item {
  text-align: center;
  color: white;
}

.summary-label {
  display: block;
  font-size: 11px;
  opacity: 0.9;
  margin-bottom: 2px;
}

.summary-value {
  font-size: 16px;
  font-weight: 600;
}

.anchor-list-container {
  max-height: 60vh;
  overflow-y: auto;
}

.anchor-detail-item {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.anchor-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.anchor-detail-id {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.anchor-detail-earnings {
  font-size: 15px;
  font-weight: 600;
  color: #667eea;
}

.anchor-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.detail-stat {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  background: #f8f9fc;
  border-radius: 6px;
}

.detail-label {
  font-size: 12px;
  color: #666;
}

.detail-value {
  font-size: 12px;
  font-weight: 500;
  color: #333;
}

.card-header.clickable {
  cursor: pointer;
  transition: background 0.2s;
}

.card-header.clickable:active {
  background: #f5f5f5;
}

.card-arrow {
  font-size: 20px;
  color: #999;
  margin-left: auto;
}

.earnings-total-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  margin-bottom: 15px;
}

.earnings-total-header .total-label {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
}

.earnings-total-header .total-amount {
  font-size: 22px;
  font-weight: 700;
  color: white;
}

.earnings-detail-container {
  max-height: 70vh;
  overflow-y: auto;
}

.earnings-detail-item {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.earnings-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.earnings-type {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.earnings-amount {
  font-size: 15px;
  font-weight: 600;
  color: #667eea;
}

.tax-amount {
  color: #e74c3c;
  font-weight: 500;
}

.commission-box {
  margin-top: 8px;
  padding: 8px;
  background: #fff5f5;
  border-radius: 8px;
  border-left: 3px solid #ff6b6b;
}

.commission-box.income {
  background: #f0fff4;
  border-left: 3px solid #51cf66;
}

.commission-out {
  color: #ff6b6b;
  font-weight: 500;
}

.commission-in {
  color: #51cf66;
  font-weight: 500;
}

.earnings-detail-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background: #f8f9fc;
  border-radius: 6px;
}

.info-label {
  font-size: 12px;
  color: #666;
}

.info-value {
  font-size: 12px;
  color: #333;
}

.image-preview-modal {
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
}

.image-preview-modal .image-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  color: white;
  cursor: pointer;
  z-index: 1001;
}

.image-preview-modal #previewImage {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.stat-item.clickable {
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  border-radius: 8px;
}

.stat-item.clickable:hover {
  background: #f0f0f0;
}

.stat-item.clickable:active {
  transform: scale(0.98);
}

.agents-container {
  max-height: 70vh;
  overflow-y: auto;
}

.agent-card-item {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.agent-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.agent-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.agent-earnings {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
}

.agent-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agent-card-info .info-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background: #f8f9fc;
  border-radius: 6px;
}

.agent-card-info .info-label {
  font-size: 12px;
  color: #666;
}

.agent-card-info .info-value {
  font-size: 12px;
  color: #333;
}

.level-chain {
  font-size: 12px;
  color: #667eea;
  background: #f0f2ff;
  padding: 2px 6px;
  border-radius: 4px;
}

.image-preview-box {
  margin-top: 10px;
}

.image-preview-box img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.multi-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.multi-preview-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.2s;
}

.multi-preview-img:hover {
  transform: scale(1.05);
}

.upload-progress {
  color: #667eea;
  font-size: 14px;
  padding: 10px;
}

.profile-info {
  padding: 10px 0;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.profile-item .label {
  color: #666;
  font-size: 14px;
}

.profile-item .value {
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.date-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 15px;
}

.date-filter-bar label {
  font-size: 13px;
  color: #666;
}

.date-filter-bar input[type="date"] {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  min-width: 120px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

@media (max-width: 480px) {
  .date-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .date-filter-bar label {
    font-size: 12px;
  }
  
  .date-filter-bar input[type="date"] {
    width: 100%;
    min-width: auto;
  }
  
  .date-filter-bar .btn-sm {
    width: 48%;
  }
  
  .date-filter-bar .btn-primary.btn-sm,
  .date-filter-bar .btn-secondary.btn-sm {
    flex: 1;
  }
}

.images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item .remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.6);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

.article-detail-content {
  padding: 15px;
}

.article-body {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 15px;
  white-space: pre-wrap;
}

.article-images {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
}

.upload-error {
  color: #e74c3c;
  font-size: 14px;
  padding: 10px;
}

.app-download-content {
  padding: 15px;
}

.download-tips {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

.download-section {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 15px;
}

.download-section h4 {
  margin: 0 0 15px 0;
  color: #333;
}

.download-qrcode {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  margin-bottom: 15px;
  cursor: pointer;
}

.anchor-detail-card {
  background: #f8f9fc;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e8ecf0;
}

.anchor-detail-header-info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 12px;
  text-align: center;
  color: white;
}

.anchor-id-large {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.anchor-platform {
  font-size: 11px;
  opacity: 0.9;
}

.anchor-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
}

.anchor-stat-box {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 10px;
}

.anchor-stat-box .stat-title {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 2px solid #667eea;
}

.anchor-stat-box .stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #e0e0e0;
}

.anchor-stat-box .stat-row:last-child {
  border-bottom: none;
}

.anchor-stat-box .stat-label {
  font-size: 11px;
  color: #666;
}

.anchor-stat-box .stat-value {
  font-size: 12px;
  font-weight: 500;
  color: #333;
}

.anchor-stat-box .stat-value.highlight {
  color: #667eea;
  font-weight: 600;
}

@media (min-width: 481px) {
  .anchor-detail-header-info {
    padding: 18px;
  }
  
  .anchor-id-large {
    font-size: 18px;
    margin-bottom: 6px;
  }
  
  .anchor-platform {
    font-size: 13px;
  }
  
  .anchor-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 15px;
  }
  
  .anchor-stat-box {
    padding: 12px;
  }
  
  .anchor-stat-box .stat-title {
    font-size: 14px;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }
  
  .anchor-stat-box .stat-row {
    padding: 6px 0;
  }
  
  .anchor-stat-box .stat-label {
    font-size: 12px;
  }
  
  .anchor-stat-box .stat-value {
    font-size: 13px;
  }
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .form-row .form-group {
    margin-bottom: 15px;
  }
}

.activity-card {
  background: #f8f9fc;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid #e8ecf0;
  cursor: pointer;
  transition: transform 0.2s;
}

.activity-card:active {
  transform: scale(0.98);
}

.activity-card.activity-active {
  border-left: 3px solid #52c41a;
}

.activity-card.activity-upcoming {
  border-left: 3px solid #1890ff;
}

.activity-card.activity-ended {
  border-left: 3px solid #999;
  opacity: 0.7;
}

.activity-image {
  margin-bottom: 6px;
  border-radius: 6px;
  overflow: hidden;
}

.activity-image img {
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: cover;
  display: block;
}

.activity-no-image {
  height: 100px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  border-radius: 6px;
}

.activity-no-image span {
  font-size: 40px;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.activity-header h3 {
  font-size: 14px;
  color: #333;
  margin: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  background: #f0f0f0;
  color: #666;
  margin-left: 8px;
  flex-shrink: 0;
}

.activity-active .activity-status {
  background: #f6ffed;
  color: #52c41a;
}

.activity-upcoming .activity-status {
  background: #e6f7ff;
  color: #1890ff;
}

.activity-ended .activity-status {
  background: #f5f5f5;
  color: #999;
}

.activity-info {
  margin-bottom: 6px;
}

.activity-info p {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 12px;
  color: #666;
  border-bottom: 1px dashed #eee;
}

.activity-info p:last-child {
  border-bottom: none;
}

.activity-info p span {
  color: #999;
}

.activity-info p strong {
  color: #333;
}

.activity-info p strong.highlight {
  color: #ff4d4f;
  font-size: 13px;
}

.activity-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
  padding-top: 6px;
  border-top: 1px solid #f0f0f0;
}

.activity-detail-info {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.activity-detail-info .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #e8e8e8;
}

.activity-detail-info .detail-row:last-child {
  border-bottom: none;
}

.activity-detail-info .label {
  color: #666;
  font-size: 14px;
}

.activity-detail-info .value {
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.activity-detail-info .value.highlight {
  color: #ff4d4f;
  font-size: 16px;
}

.activity-detail-info .detail-desc {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e8e8e8;
}

.activity-detail-info .detail-desc h4 {
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
}

.activity-detail-info .detail-desc p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.activity-records {
  margin-top: 15px;
}

.activity-records h4 {
  font-size: 15px;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.activity-record-item {
  background: #f8f9fc;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #e8ecf0;
}

.activity-record-item .record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
}

.activity-record-item .record-header .completed {
  color: #52c41a;
  font-weight: 500;
}

.activity-record-item .record-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
  transition: width 0.3s;
}

.progress-text {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

.activity-record-item .reward-info {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #eee;
  font-size: 13px;
  color: #52c41a;
}

.no-records {
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 14px;
}

.activity-tiers {
  margin-top: 15px;
  padding: 15px;
  background: #fff9e6;
  border-radius: 8px;
  border: 1px solid #ffe58f;
}

.activity-tiers h4 {
  font-size: 14px;
  color: #d48806;
  margin-bottom: 12px;
}

.tier-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier-item-base, .tier-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fc;
  border-radius: 6px;
  font-size: 13px;
}

.tier-item-base {
  background: #fffbe6;
  border: 1px solid #ffe58f;
}

.tier-item {
  background: #fafafa;
  border: 1px solid #e8e8e8;
}

.tier-target {
  color: #666;
}

.tier-reward {
  color: #ff4d4f;
  font-weight: 600;
}

.profile-header-compact {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px 15px;
  display: flex;
  align-items: center;
  color: white;
}

.profile-avatar-small {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.profile-info-inline {
  margin-left: 12px;
  flex: 1;
}

.profile-name-inline {
  font-size: 16px;
  font-weight: 600;
}

.profile-level-inline {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin-top: 4px;
}

.profile-earnings-compact {
  display: flex;
  align-items: center;
  background: #f8f9fc;
  margin: -10px 10px 10px;
  border-radius: 10px;
  border: 1px solid #e8ecf0;
  padding: 12px 15px;
}

.earnings-item-main {
  text-align: center;
  flex: 1;
}

.earnings-value-main {
  font-size: 22px;
  font-weight: 600;
  color: #667eea;
}

.earnings-item {
  text-align: center;
  flex: 1;
}

.earnings-value-small {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.earnings-label-small {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

.earnings-divider {
  width: 1px;
  height: 30px;
  background: #e8e8e8;
  margin: 0 8px;
}

.withdraw-btn-small {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  margin-left: 10px;
}

.profile-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px;
}

.menu-grid-item {
  background: #f8f9fc;
  border-radius: 10px;
  padding: 15px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
  border: 1px solid #e8ecf0;
}

.menu-grid-item:active {
  transform: scale(0.95);
}

.menu-icon-grid {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin: 0 auto 8px;
}

.menu-icon-grid svg {
  width: 20px;
  height: 20px;
  stroke: white;
  stroke-width: 2;
}

.menu-text-grid {
  font-size: 12px;
  color: #333;
}

.profile-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  margin-top: 10px;
  background: #f8f9fc;
  border-radius: 10px;
  margin-left: 10px;
  margin-right: 10px;
  border: 1px solid #e8ecf0;
}

.profile-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.user-name-label {
  font-size: 11px;
  color: #999;
}

.user-name-value {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.user-level-value {
  font-size: 14px;
  color: #667eea;
  font-weight: 600;
}

.logout-btn {
  font-size: 13px;
  color: #ff4757;
  cursor: pointer;
  padding: 6px 12px;
  background: #fff5f5;
  border-radius: 15px;
}

.info-value.highlight {
  color: #667eea;
  font-weight: 600;
}

.copy-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.copy-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media screen and (min-width: 375px) {
  body {
    font-size: 15px;
  }
  .stats-row {
    gap: 10px;
  }
  .stat-item .value {
    font-size: 20px;
  }
}

@media screen and (min-width: 414px) {
  body {
    font-size: 16px;
  }
  .profile-menu-grid {
    gap: 12px;
  }
  .menu-icon-grid {
    width: 42px;
    height: 42px;
  }
}

@media screen and (min-width: 768px) {
  .app-container {
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
  }
  .app-nav {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
  }
  .stats-row {
    gap: 15px;
  }
  .stat-item .value {
    font-size: 22px;
  }
  .profile-menu-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media screen and (max-width: 320px) {
  body {
    font-size: 13px;
  }
  .profile-menu-grid {
    gap: 8px;
  }
  .menu-icon-grid {
    width: 32px;
    height: 32px;
  }
  .menu-icon-grid svg {
    width: 18px;
    height: 18px;
  }
  .menu-text-grid {
    font-size: 11px;
  }
  .earnings-value-main {
    font-size: 18px;
  }
  .earnings-value-small {
    font-size: 14px;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item .value {
    font-size: 16px;
  }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .app-nav {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
  .page {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
}

@supports (padding-top: env(safe-area-inset-top)) {
  .app-header {
    padding-top: calc(12px + env(safe-area-inset-top));
  }
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
