/* style.css - Dark theme styling */

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

:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12121f;
  --bg-card: #1a1a2e;
  --accent-purple: #6c5ce7;
  --accent-blue: #0984e3;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border: #2a2a3e;
  --success: #00b894;
  --warning: #fdcb6e;
  --error: #e17055;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
header {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--accent-purple);
  padding: 1.5rem 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.1);
}

header h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Section */
.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--accent-purple);
}

/* Drop zones */
.dropzone-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.dropzone {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone:hover {
  border-color: var(--accent-purple);
  background: rgba(108, 92, 231, 0.05);
}

.dropzone.dragover {
  border-color: var(--accent-blue);
  background: rgba(9, 132, 227, 0.1);
}

.dropzone-placeholder .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.dropzone-placeholder p {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.dropzone-placeholder .hint {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Model card */
.model-card {
  width: 100%;
}

.model-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.model-card h3 {
  color: var(--accent-purple);
  margin-bottom: 1rem;
  word-break: break-all;
}

.model-stats {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.stat {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

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

.stat .label {
  color: var(--text-secondary);
  font-weight: 500;
}

.stat .value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Loading */
.loading {
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error */
.error {
  text-align: center;
  color: var(--error);
}

.error-msg {
  font-size: 0.9rem;
  margin: 1rem 0;
  opacity: 0.8;
}

/* Buttons */
button, .btn {
  background: var(--accent-purple);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

button:hover:not(:disabled), .btn:hover {
  background: #5f4cd1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

button:disabled {
  background: var(--border);
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent-purple);
}

/* Strategy controls */
.strategy-controls {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.control-group {
  margin-bottom: 1.5rem;
}

.control-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.control-group select {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  cursor: pointer;
}

.param-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.param-group label {
  flex: 0 0 200px;
  margin-bottom: 0;
}

.param-group input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  outline: none;
}

.param-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent-purple);
  border-radius: 50%;
  cursor: pointer;
}

.param-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent-purple);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.param-group span {
  flex: 0 0 50px;
  text-align: right;
  font-weight: 600;
  color: var(--accent-blue);
}

.btn-simulate {
  width: 100%;
  font-size: 1.2rem;
  padding: 1rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 1rem 1.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: none;
  box-shadow: none;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(108, 92, 231, 0.1);
  transform: none;
  box-shadow: none;
}

.tab-btn.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
  background: transparent;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Summary cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.summary-card.highlight {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
}

.summary-card h3 {
  color: var(--accent-purple);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.summary-card p {
  margin-bottom: 0.5rem;
}

.summary-card .note {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Compatibility */
.compatibility-summary {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.compatibility-summary h3 {
  color: var(--accent-purple);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat-box {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 1.5rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Tensor list */
.tensor-list {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
}

.tensor-list h4 {
  color: var(--accent-purple);
  margin-bottom: 1rem;
}

.tensor-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

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

.tensor-item .status {
  font-size: 1.2rem;
}

.tensor-item .name {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--accent-blue);
}

.tensor-item .message {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tensor-item.compatible .status {
  color: var(--success);
}

.tensor-item.incompatible .status {
  color: var(--error);
}

.tensor-item.warning .status {
  color: var(--warning);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--accent-purple);
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
}

footer p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--accent-purple);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

/* Utility */
.hidden {
  display: none;
}

.note {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .dropzone-container {
    grid-template-columns: 1fr;
  }
  
  .summary-cards {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .param-group {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .param-group label {
    flex: none;
  }
  
  .param-group input[type="range"] {
    width: 100%;
  }
}

/* Hidden file inputs */
input[type="file"] {
  display: none;
}
