/* Modern ICS Toolbox Styles */
:root {
  --bg: #0f172a;
  --fg: #f1f5f9;
  --muted: #94a3b8;
  --card: #1e293b;
  --card-hover: #2d3b52;
  --border: #334155;
  --brand: #6366f1;
  --brand-hover: #4f46e5;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --fg: #0f172a;
    --muted: #64748b;
    --card: #f8fafc;
    --card-hover: #f1f5f9;
    --border: #e2e8f0;
    --brand: #6366f1;
    --brand-hover: #4f46e5;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  }
}

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

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

.header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.lead {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Info cards */
.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.info-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--fg);
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.feature-item:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.feature-item h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.feature-item p {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Use cases */
.use-cases-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.use-cases-list li {
  padding: 0.875rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.use-cases-list li:hover {
  background: var(--card-hover);
  border-color: var(--brand);
  transform: translateX(4px);
}

/* Main tool card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.main-tool h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.tool-instructions {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* File input and drop zone */
#file-input {
  display: none;
}

.drop {
  border: 2px dashed var(--border);
  padding: 3rem 2rem;
  border-radius: 12px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1.5rem;
}

.drop:hover,
.drop.hover {
  border-color: var(--brand);
  background: rgba(99, 102, 241, 0.05);
  transform: scale(1.01);
}

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

.drop-text {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.drop-hint {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* File list */
.file-list {
  margin: 1.5rem 0;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.file-name {
  font-weight: 500;
  color: var(--fg);
}

.file-remove {
  color: var(--error);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.file-remove:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* Options grid */
.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--fg);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.input-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label > span {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--fg);
}

.input-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

input[type="text"],
input[type="datetime-local"],
input[type="number"] {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input::placeholder {
  color: var(--muted);
}

/* Checkbox options */
.checkbox-options {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Action buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.btn-icon {
  font-size: 1.25rem;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
}

.btn.primary:hover:not(:disabled) {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn.secondary:hover:not(:disabled) {
  background: var(--card-hover);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Preview section */
.preview-section {
  margin-top: 2rem;
}

.event-count {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* Event list */
.list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.item:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.item.conflict {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.05);
}

.title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.muted {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Help section */
.notes {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 2rem;
}

.notes h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.notes ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.notes li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.notes li:last-child {
  border-bottom: none;
}

.notes strong {
  color: var(--brand);
  font-weight: 600;
}

/* Privacy notice */
.privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  margin-top: 1.5rem;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
}

.notice-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.privacy-notice p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Responsive design */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .lead {
    font-size: 1rem;
  }

  .info-card,
  .card,
  .notes {
    padding: 1.5rem;
  }

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

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

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

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .drop {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem 3rem;
  }

  .header {
    padding: 2rem 1rem 1.5rem;
  }

  .header h1 {
    font-size: 1.75rem;
  }
}

/* File list styles */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
}

.file-name {
  font-weight: 500;
  color: var(--text);
}

.file-size {
  color: var(--muted);
  font-size: 0.75rem;
}

.event-count {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
