body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  margin: 0;
  color: #222;
}
nav {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 1rem 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
nav a {
  color: #0077cc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
nav a:hover {
  color: #005fa3;
}
.container {
  max-width: 1500px;
  margin: 2rem auto;
  background: rgba(255,255,255,0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  padding: 2rem;
}
h1, h2 {
  font-weight: 700;
  margin-top: 0;
}
h1 {
  margin-bottom: 0.5em;
}
section {
  margin-bottom: 2.5rem;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fafbfc;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
thead {
  background: #f0f2f5;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
}
th {
  font-size: 1rem;
  font-weight: 600;
  color: #444;
}
tbody tr:nth-child(even) {
  background: #f6f8fa;
}
tbody tr:hover {
  background: #eaf3fb;
}
input, select, button {
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  outline: none;
  transition: border 0.2s;
}
input:focus, select:focus {
  border-color: #0077cc;
}
button {
  background: linear-gradient(90deg, #0077cc 60%, #00b4d8 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,123,255,0.08);
  transition: background 0.2s;
}
button:hover {
  background: linear-gradient(90deg, #005fa3 60%, #0096c7 100%);
}
footer {
  text-align: center;
  color: #888;
  margin: 2rem 0 1rem 0;
  font-size: 0.95rem;
}
#live-prices table, #item-list table, #cart-table, #manage-list-table {
  margin-top: 1rem;
}
#live-prices th, #live-prices td {
  text-align: center;
}
#metal-charts {
  margin-top: 2rem;
}
#chart-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 1.5rem;
  margin-top: 1rem;
  width: 100%;
  min-height: 400px;
}
#chart-container canvas {
  width: 100% !important;
  height: 350px !important;
  display: block;
  margin: 0 auto;
}
#add-item-form, #manage-item-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
#add-item-form input[type="text"], #add-item-form input[type="number"], #add-item-form select {
  min-width: 120px;
}
#item-purity, #manage-purity {
  min-width: 180px;
}

/* Style for datalist dropdown */
input[list] {
  position: relative;
}

input[list]::-webkit-calendar-picker-indicator {
  color: #4a5568;
  cursor: pointer;
}
.purity-help {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.25rem;
  font-style: italic;
}
#add-item-form button, #manage-item-form button {
  min-width: 120px;
}
#cart-table th, #cart-table td {
  text-align: center;
}
#cart-summary td {
  font-weight: 700;
  background: #e0f7fa;
}
::-webkit-scrollbar {
  width: 8px;
  background: #f0f2f5;
}
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Chart specific styles */
.time-btn {
  background: #e2e8f0;
  color: #4a5568;
  border: none;
  padding: 0.5rem 1rem;
  margin: 0.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}
.time-btn:hover {
  background: #cbd5e0;
}
.time-btn.active {
  background: #3182ce;
  color: white;
}
.chart-controls {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}
.chart-controls label {
  font-weight: 600;
  margin-right: 0.5rem;
}
#chart-change-info {
  font-weight: 600;
  padding: 0.5rem;
}

/* Chart container fixes */
#chart-container {
  position: relative;
  height: 400px;
  width: 100%;
  margin: 1rem 0;
}

#metal-chart {
  max-width: 100%;
  height: 400px !important;
}

/* Modal styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
  margin: 0;
  color: #2d3748;
}

.close-modal {
  font-size: 28px;
  font-weight: bold;
  color: #a0aec0;
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #4a5568;
}

.modal-body {
  padding: 2rem;
  min-width: 600px;
}

.manage-btn {
  background: linear-gradient(90deg, #48bb78 60%, #38a169 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.manage-btn:hover {
  background: linear-gradient(90deg, #38a169 60%, #2f855a 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

@media (max-width: 768px) {
  .modal-body {
    min-width: unset;
    padding: 1rem;
  }
  
  .modal-content {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
  }
} 