/* Enhanced D&D Manager Styling */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cinzel+Decorative:wght@400;700;900&display=swap');

/* CSS Variables for D&D Theme */
:root {
  /* Color Palette */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: #0f1419;
  --bg-modal: #1a1a2e;
  --bg-overlay: rgba(0, 0, 0, 0.8);
  
  --text-primary: #f4f1de;
  --text-secondary: #d4af37;
  --text-muted: #a0a0a0;
  --text-gold: #d4af37;
  --text-gold-light: #f4d03f;
  --text-gold-dark: #b7950b;
  
  --color-primary: #d4af37;
  --color-secondary: #8b4513;
  --color-accent: #ff6b35;
  --color-danger: #dc3545;
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-info: #17a2b8;
  
  --border-primary: #d4af37;
  --border-secondary: #8b4513;
  --border-muted: #444;
  
  --shadow-gold: rgba(212, 175, 55, 0.3);
  --shadow-gold-strong: rgba(212, 175, 55, 0.6);
  --shadow-dark: rgba(0, 0, 0, 0.8);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.3);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 3rem;
  
  /* Typography */
  --font-family-primary: 'Cinzel', serif;
  --font-family-decorative: 'Cinzel Decorative', serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
  color: var(--text-primary);
  font-family: var(--font-family-primary);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-decorative);
  color: var(--text-gold);
  text-shadow: 2px 2px 4px var(--shadow-dark);
  margin-bottom: var(--spacing-md);
}

.gold-text {
  color: var(--text-gold);
  font-family: var(--font-family-decorative);
  font-weight: 600;
  text-shadow: 2px 2px 4px var(--shadow-dark);
  background: linear-gradient(135deg, 
    var(--text-gold-light),
    var(--text-gold),
    var(--text-gold-dark)
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.golden-underline {
  border-bottom: 3px solid var(--border-primary);
  padding-bottom: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.golden-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--text-gold), transparent);
}

/* Header Styling */
.manager-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-bottom: 3px solid var(--border-primary);
  box-shadow: 0 4px 20px var(--shadow-gold-strong);
  position: relative;
  overflow: hidden;
}

.manager-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23d4af37" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

/* Navigation Tabs */
.nav-tabs-custom {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-muted);
}

.nav-tab {
  background: transparent;
  border: 2px solid transparent;
  color: var(--text-muted);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-family: var(--font-family-primary);
  font-weight: 600;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.nav-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
  transition: left var(--transition-slow);
}

.nav-tab:hover::before {
  left: 100%;
}

.nav-tab:hover {
  color: var(--text-gold);
  border-color: var(--border-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-gold);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--text-gold), var(--text-gold-dark));
  color: var(--bg-primary);
  border-color: var(--border-primary);
  box-shadow: 0 4px 16px var(--shadow-gold-strong);
}

.nav-tab i {
  margin-right: var(--spacing-sm);
  font-size: var(--font-size-lg);
}

/* Cards */
.card-custom {
  background: var(--bg-card);
  border: 2px solid var(--border-muted);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--text-gold), var(--text-gold-dark), var(--text-gold));
}

.card-custom:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-gold);
  border-color: var(--border-primary);
}

.card-header-custom {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border-bottom: 2px solid var(--border-primary);
  color: var(--text-gold);
  font-family: var(--font-family-decorative);
  font-weight: 700;
  padding: var(--spacing-lg);
  position: relative;
}

.card-header-custom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--text-gold), transparent);
}

/* Buttons */
.btn-custom {
  font-family: var(--font-family-primary);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-slow);
}

.btn-custom:hover::before {
  left: 100%;
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--text-gold), var(--text-gold-dark));
  border: 2px solid var(--border-primary);
  color: var(--bg-primary);
  box-shadow: 0 4px 12px var(--shadow-gold);
}

.btn-primary-custom:hover {
  background: linear-gradient(135deg, var(--text-gold-light), var(--text-gold));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-gold-strong);
  color: var(--bg-primary);
}

.btn-secondary-custom {
  background: transparent;
  border: 2px solid var(--border-muted);
  color: var(--text-primary);
}

.btn-secondary-custom:hover {
  background: var(--bg-secondary);
  border-color: var(--border-primary);
  color: var(--text-gold);
  transform: translateY(-2px);
}

.btn-danger-custom {
  background: linear-gradient(135deg, var(--color-danger), #c82333);
  border: 2px solid var(--color-danger);
  color: white;
}

.btn-danger-custom:hover {
  background: linear-gradient(135deg, #e74c3c, var(--color-danger));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

/* Form Elements */
.form-control-custom {
  background: var(--bg-card) !important;
  border: 2px solid var(--border-muted) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md);
  font-family: var(--font-family-primary);
  transition: all var(--transition-normal);
}

.form-control-custom:focus {
  background: var(--bg-secondary) !important;
  border-color: var(--border-primary) !important;
  box-shadow: 0 0 0 0.2rem var(--shadow-gold) !important;
  color: var(--text-primary) !important;
}

.form-control-custom::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.form-label-custom {
  color: var(--text-gold);
  font-family: var(--font-family-primary);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: var(--font-size-sm);
}

/* Modals */
.modal-content-custom {
  background: var(--bg-modal);
  border: 3px solid var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 40px var(--shadow-gold-strong);
  position: relative;
  overflow: hidden;
}

.modal-content-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--text-gold), var(--text-gold-dark), var(--text-gold));
}

.modal-header-custom {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border-bottom: 2px solid var(--border-primary);
  color: var(--text-gold);
  font-family: var(--font-family-decorative);
  font-weight: 700;
  padding: var(--spacing-lg);
}

.modal-body-custom {
  background: var(--bg-card);
  padding: var(--spacing-xl);
}

/* Lists and Items */
.list-item-custom {
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  padding: var(--spacing-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.list-item-custom::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--text-gold), var(--text-gold-dark));
  transform: scaleY(0);
  transition: transform var(--transition-normal);
}

.list-item-custom:hover::before {
  transform: scaleY(1);
}

.list-item-custom:hover {
  background: var(--bg-secondary);
  border-color: var(--border-primary);
  transform: translateX(8px);
  box-shadow: 0 4px 12px var(--shadow-gold);
}

/* Progress Bars */
.progress-custom {
  background: var(--bg-card);
  border: 2px solid var(--border-muted);
  border-radius: var(--radius-lg);
  height: 1.5rem;
  overflow: hidden;
  position: relative;
}

.progress-bar-custom {
  background: linear-gradient(135deg, var(--text-gold), var(--text-gold-dark));
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.progress-bar-custom::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Notifications */
.notification-custom {
  background: var(--bg-card);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: 0 4px 12px var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.notification-custom::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--text-gold);
}

.notification-custom.success::before {
  background: var(--color-success);
}

.notification-custom.danger::before {
  background: var(--color-danger);
}

.notification-custom.warning::before {
  background: var(--color-warning);
}

/* Filters */
.filters-custom {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  backdrop-filter: blur(10px);
  margin-bottom: var(--spacing-lg);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.filter-label {
  color: var(--text-gold);
  font-family: var(--font-family-primary);
  font-weight: 600;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 80px;
}

.filter-buttons {
  display: flex;
  gap: var(--spacing-xs);
}

.filter-btn {
  background: transparent;
  border: 2px solid var(--border-muted);
  color: var(--text-muted);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.filter-btn:hover {
  border-color: var(--border-primary);
  color: var(--text-gold);
  background: rgba(212, 175, 55, 0.1);
}

.filter-btn.active {
  background: var(--text-gold);
  border-color: var(--border-primary);
  color: var(--bg-primary);
}

/* Audio Preview */
.audio-preview-btn {
  background: transparent;
  border: 2px solid var(--border-primary);
  color: var(--text-gold);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.audio-preview-btn:hover {
  background: var(--text-gold);
  color: var(--bg-primary);
  transform: scale(1.1);
  box-shadow: 0 4px 12px var(--shadow-gold);
}

/* Scene Cards */
.scene-card {
  background: var(--bg-card);
  border: 2px solid var(--border-muted);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.scene-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--text-gold), var(--text-gold-dark), var(--text-gold));
}

.scene-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-gold);
  border-color: var(--border-primary);
}

.scene-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 2px solid var(--border-muted);
}

.scene-info {
  padding: var(--spacing-md);
  background: var(--bg-secondary);
}

.scene-name {
  color: var(--text-gold);
  font-family: var(--font-family-decorative);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-lg);
}

.scene-category {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-tabs-custom {
    flex-direction: column;
  }
  
  .nav-tab {
    margin-bottom: var(--spacing-sm);
  }
  
  .filter-group {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .filter-buttons {
    width: 100%;
    justify-content: space-between;
  }
}

/* Loading States */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-muted);
  border-radius: 50%;
  border-top-color: var(--text-gold);
  animation: spin 1s ease-in-out infinite;
}

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

/* Utility Classes */
.text-gold { color: var(--text-gold); }
.text-muted { color: var(--text-muted); }
.bg-card { background: var(--bg-card); }
.bg-modal { background: var(--bg-modal); }
.border-gold { border-color: var(--border-primary); }
.shadow-gold { box-shadow: 0 4px 12px var(--shadow-gold); }

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
