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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #eee;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 5px;
  background: linear-gradient(45deg, #00b4d8, #00ffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: #8892b0;
  font-size: 0.9rem;
}

.price-summary {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px;
  background: rgba(0, 180, 216, 0.1);
  border-radius: 12px;
  margin-bottom: 20px;
}

.summary-card .label {
  font-size: 0.85rem;
  color: #8892b0;
  margin-bottom: 5px;
}

.summary-card .value {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: #00b4d8;
}

.summary-card .change {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 5px;
}

.change.positive {
  color: #4ade80;
}

.change.negative {
  color: #f87171;
}

.change.neutral {
  color: #8892b0;
}

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

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s, background 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
}

.stat-card .label {
  font-size: 0.75rem;
  color: #8892b0;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card .value {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 600;
  color: #fff;
}

.chart-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  height: fit-content;
}

.chart-section h2 {
  color: #00b4d8;
  margin-bottom: 15px;
  font-size: 1.3rem;
  text-align: center;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 200px;
  max-height: 200px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .chart-container {
    height: 250px;
    max-height: 250px;
  }
}

.triggers-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.triggers-section h2 {
  color: #00b4d8;
  margin-bottom: 15px;
  font-size: 1.3rem;
  text-align: center;
}

.btn-toggle {
  background: linear-gradient(45deg, #00b4d8, #0096c8);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  width: 100%;
}

.btn-toggle:hover {
  background: linear-gradient(45deg, #0096c8, #0077b6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

.btn-submit {
  background: linear-gradient(45deg, #4ade80, #22c55e);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-submit:hover {
  background: linear-gradient(45deg, #22c55e, #16a34a);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.btn-delete {
  background: linear-gradient(45deg, #f87171, #ef4444);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-delete:hover {
  background: linear-gradient(45deg, #ef4444, #dc2626);
  transform: translateY(-1px);
}

.trigger-form {
  margin-top: 15px;
}

.trigger-form.hidden {
  display: none;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.form-row select,
.form-row input {
  flex: 1;
  min-width: 140px;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form-row select:focus,
.form-row input:focus {
  outline: none;
  border-color: #00b4d8;
}

.form-row select::placeholder,
.form-row input::placeholder {
  color: #8892b0;
}

.form-row button {
  flex-shrink: 0;
}

.triggers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.trigger-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  transition: all 0.2s;
}

.trigger-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 180, 216, 0.3);
}

.trigger-card h3 {
  color: #00b4d8;
  font-size: 1rem;
  margin-bottom: 8px;
  word-break: break-all;
}

.trigger-details {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 12px;
}

.trigger-details span {
  display: block;
  margin-bottom: 3px;
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.status-fired {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.status-inactive {
  background: rgba(158, 158, 158, 0.2);
  color: #9e9e9e;
}

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

footer {
  text-align: center;
  padding: 15px 0;
  color: #8892b0;
  font-size: 0.85rem;
}

.price-table-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.price-table-section h2 {
  color: #00b4d8;
  margin-bottom: 15px;
  font-size: 1.3rem;
  text-align: center;
}

.table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

#price-table thead th {
  background: rgba(0, 180, 216, 0.1);
  color: #00b4d8;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
}

#price-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#price-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

#price-table tbody tr:last-child td {
  border-bottom: none;
}

#price-table tbody td:nth-child(1) {
  color: #8892b0;
  font-family: monospace;
  font-size: 0.8rem;
}

#price-table tbody td:nth-child(2) {
  color: #aaa;
}

#price-table tbody td:nth-child(3) {
  color: #00b4d8;
  font-weight: 600;
}

#price-table tbody td:nth-child(4) {
  color: #4ade80;
  font-weight: 700;
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row button {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  header h1 {
    font-size: 1.8rem;
  }
}
