/* Color Palette */
:root {
  --vinyl-black: #1a1a1a;
  --warm-cream: #f5f1e8;
  --studio-gold: #d4a574;
  --success-green: #2d6e4e;
  --processing-blue: #4a7ba7;
  --submitted-gray: #6b6b6b;
  --error-red: #c54545;
  --card-white: #ffffff;
  --border-gray: #e0e0e0;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+Pro:wght@300;400;600;700&display=swap');

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

body {
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  background-color: var(--warm-cream);
  color: var(--vinyl-black);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
}

/* Navigation */
.main-nav {
  background-color: var(--vinyl-black);
  padding: 1rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--studio-gold);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-user {
  color: var(--warm-cream);
  font-weight: 600;
}

.nav-link {
  color: var(--warm-cream);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--studio-gold);
}

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--vinyl-black) 0%, #2a2a2a 100%);
  padding: 1rem;
}

.auth-container {
  width: 100%;
  max-width: 450px;
}

.auth-card {
  background: var(--card-white);
  border-radius: 12px;
  padding: 3rem 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.auth-title {
  font-size: 2.5rem;
  color: var(--vinyl-black);
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--submitted-gray);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--submitted-gray);
}

.auth-switch a {
  color: var(--studio-gold);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.form-group label {
  font-weight: 600;
  color: var(--vinyl-black);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.85rem 1rem;
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  transition: border-color 0.3s ease;
  background: var(--card-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--studio-gold);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.required {
  color: var(--error-red);
}

/* Buttons */
.btn {
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-height: 48px;
  line-height: 1.5;
}

.btn-primary {
  background-color: var(--studio-gold);
  color: var(--vinyl-black);
}

.btn-primary:hover {
  background-color: #c49563;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--vinyl-black);
  border: 2px solid var(--vinyl-black);
}

.btn-secondary:hover {
  background-color: var(--vinyl-black);
  color: var(--warm-cream);
}

.btn-danger {
  background-color: var(--error-red);
  color: white;
}

.btn-danger:hover {
  background-color: #b03535;
}

/* Dashboard */
.dashboard-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  color: var(--vinyl-black);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card-white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empty-state p {
  font-size: 1.2rem;
  color: var(--submitted-gray);
  margin-bottom: 2rem;
}

/* Songs Grid */
.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.song-card {
  background: var(--card-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.song-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.song-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.song-title {
  font-size: 1.5rem;
  color: var(--vinyl-black);
  margin: 0;
  flex: 1;
}

.song-status {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-submitted {
  background-color: #e8e8e8;
  color: var(--submitted-gray);
}

.status-processing {
  background-color: #e3f2fd;
  color: var(--processing-blue);
}

.status-claimed {
  background-color: #e8f5e9;
  color: var(--success-green);
}

.song-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.song-detail {
  display: flex;
  gap: 0.5rem;
}

.detail-label {
  font-weight: 600;
  color: var(--submitted-gray);
  min-width: 110px;
}

.detail-value {
  color: var(--vinyl-black);
}

.song-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-gray);
}

.song-actions .btn {
  flex: 1;
  padding: 0.7rem 1rem;
}

/* Form Pages */
.form-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.form-container {
  background: var(--card-white);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-container h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--vinyl-black);
}

.song-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-section h2 {
  font-size: 1.75rem;
  color: var(--vinyl-black);
  margin-bottom: 0.5rem;
}

.writers-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.writer-card {
  background: var(--warm-cream);
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.writer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.writer-header h3 {
  font-size: 1.25rem;
  color: var(--vinyl-black);
}

.btn-remove-writer {
  background: none;
  border: none;
  color: var(--error-red);
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  min-height: 48px;
}

.btn-remove-writer:hover {
  background-color: rgba(197, 69, 69, 0.1);
}

.ownership-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--warm-cream);
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 600;
}

#totalPercentage {
  color: var(--studio-gold);
}

#totalPercentage.valid {
  color: var(--success-green);
}

#totalPercentage.invalid {
  color: var(--error-red);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
}

/* Error Messages */
.error-message {
  background-color: rgba(197, 69, 69, 0.1);
  color: var(--error-red);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--error-red);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    width: 100%;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .form-row {
    flex-direction: column;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .form-container {
    padding: 1.5rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-title {
    font-size: 2rem;
  }

  .dashboard-header h1 {
    font-size: 2rem;
  }

  .form-container h1 {
    font-size: 2rem;
  }
}
