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

body {
  width: 380px;
  height: 600px;
  background-color: #1D1E24;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Header */
.header {
  padding: 24px;
  padding-bottom: 32px;
  background: linear-gradient(to bottom, #2a2b32, #1D1E24);
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: all 0.5s ease;
}

.header.off {
  background: linear-gradient(to bottom, #2d3748, #1a202c);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand h1 {
  font-size: 18px;
  font-weight: 700;
}

.icon-shield {
  width: 24px;
  height: 24px;
  fill: #FB542B;
  color: #FB542B;
  transition: all 0.3s;
}

.header.off .icon-shield {
  fill: #718096;
  color: #718096;
}

.power-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #FB542B;
  width: 24px;
  height: 24px;
  transition: transform 0.2s, color 0.3s;
}

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

.header.off .power-btn {
  color: #718096;
}

/* Status Display */
.status-display {
  text-align: center;
}

.status-text {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9CA3AF;
  margin-bottom: 4px;
}

.header.off .status-text {
  color: #FC8181;
}

.count-text {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
}

.sub-text {
  font-size: 14px;
  color: #6B7280;
}

/* Content */
.content {
  flex-grow: 1;
  padding: 16px;
  overflow-y: auto;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* Cards */
.card {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #9CA3AF;
  text-transform: uppercase;
}

.badge {
  background: #2d3748;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-box {
  background: #25262e;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 12px;
}

.header.off ~ .content .stat-box {
  opacity: 0.5;
}

.icon-lock { color: #FB542B; margin-bottom: 4px; }
.icon-eye { color: #63B3ED; margin-bottom: 4px; }

.stat-val {
  font-size: 24px;
  font-weight: 700;
}

.stat-label {
  font-size: 12px;
  color: #6B7280;
}

.reload-msg {
  background: rgba(245, 101, 101, 0.1);
  border: 1px solid rgba(245, 101, 101, 0.2);
  color: #FEB2B2;
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
}

.hidden { display: none; }

/* Charts */
.bar-group {
  margin-bottom: 16px;
}
.bar-label {
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 4px;
}
.bar-track {
  height: 16px;
  background: #4B5563;
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
}
.chrome-fill { background: #6B7280; }
.brave-fill { background: #FB542B; }
.bar-value {
  font-size: 10px;
  color: #fff;
  text-align: right;
  margin-top: 2px;
}
.info-box {
  background: rgba(251, 84, 43, 0.1);
  border: 1px solid rgba(251, 84, 43, 0.2);
  color: #FB542B;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}

/* Settings */
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #25262e;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}
.toggle {
  width: 40px;
  height: 20px;
  background: #4A5568;
  border-radius: 10px;
  position: relative;
}
.toggle.active {
  background: #FB542B;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.2s;
}
.toggle.active::after {
  left: 22px;
}
.section-title {
  font-size: 12px;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-note {
  margin-top: 24px;
  text-align: center;
  font-size: 10px;
  color: #4B5563;
}

/* Footer Nav */
.nav-footer {
  height: 64px;
  background: #16171b;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.nav-btn {
  background: none;
  border: none;
  color: #6B7280;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-btn.active {
  color: #FB542B;
}

.nav-btn span {
  font-size: 10px;
  font-weight: 500;
}