@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&display=swap');

:root {
  /* Colors - Luxury Theme */
  --color-primary: #c4a464;
  --color-primary-hover: #d4b576;
  --color-accent: #a39c90;
  --color-bg: #070a08;
  --color-surface: #0f1511;
  --color-text: #e8e0d5;
  --color-text-muted: #a39c90;
  --color-border: rgba(196, 164, 100, 0.25);
  --color-danger: #EF4444;
  --color-success: #22C55E;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.8), 0 4px 6px -2px rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-family: 'Playfair Display', Didot, Georgia, serif;
}

/* Modern Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd {
  margin: 0;
}

ul[role="list"], ol[role="list"] {
  list-style: none;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  font-family: var(--font-family);
  background: radial-gradient(circle at 50% 5%, #1b2620 0%, var(--color-bg) 70%);
  background-attachment: fixed;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

a:not([class]) {
  text-decoration-skip-ink: auto;
}

img, picture {
  max-width: 100%;
  display: block;
}

input, button, textarea, select {
  font: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Base Elements */
a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--color-text);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(196, 164, 100, 0.2);
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 30px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: rgba(196, 164, 100, 0.05);
  color: var(--color-primary);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.btn:hover {
  text-decoration: none;
  background: rgba(196, 164, 100, 0.08);
  box-shadow: 0 0 20px rgba(196, 164, 100, 0.2);
  text-shadow: 0 0 8px rgba(196, 164, 100, 0.5);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(196, 164, 100, 0.5);
}

.btn:active {
  transform: scale(0.96);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 10px;
  letter-spacing: 2px;
}

.btn-primary {
  color: var(--color-bg);
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-bg);
}

.btn-secondary {
  color: var(--color-primary);
  background-color: rgba(196, 164, 100, 0.05);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background-color: rgba(196, 164, 100, 0.15);
  color: var(--color-primary);
}

.btn-danger {
  color: #fff;
  background-color: var(--color-danger);
  border-color: var(--color-danger);
}

.btn-danger:hover {
  background-color: #DC2626; /* Darker red */
  border-color: #DC2626;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  transform: translateY(-20px);
  transition: transform 0.2s ease-in-out;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

/* Spinner */
.loading-spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  animation: spin 1s ease-in-out infinite;
}

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

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast.show {
  transform: translateX(0);
}

.toast.success { border-left-color: var(--color-success); }
.toast.danger { border-left-color: var(--color-danger); }
.toast.warning { border-left-color: var(--color-accent); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background-color: var(--color-border);
  color: var(--color-text);
}

.badge-primary { background-color: var(--color-primary); color: #fff; }
.badge-success { background-color: var(--color-success); color: #fff; }
.badge-danger { background-color: var(--color-danger); color: #fff; }

/* AlphaTab Cursor & Sticky Player */
.at-cursor-bar {
  background: rgba(196, 164, 100, 0.1) !important;
}
.at-cursor-beat {
  background: rgba(196, 164, 100, 0.3) !important;
  border-left: 2px solid var(--color-primary) !important;
}

#player-controls {
  position: sticky;
  bottom: 0;
  z-index: 100;
  box-shadow: 0 -4px 25px rgba(0,0,0,0.8);
  backdrop-filter: blur(15px);
  background: rgba(7, 10, 8, 0.95);
  border-top: 1px solid var(--color-primary);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
