/**
 * Media Summaries CSS
 * Enhanced styling voor Dutch Fluency media-summaries
 */

:root {
  --primary-color: #ff6700;
  --primary-hover: #ff8533;
  --primary-dark: #e05a00;
  --primary-light: #fff0e6;
  --primary-transparent: rgba(255, 103, 0, 0.1);
  --secondary-color: #5e82ac;
  --text-color: #333333;
  --text-light: #666666;
  --background-light: #ffecd1;
  --background-white: #ffffff;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(255, 103, 0, 0.2);
  --success-color: #4CAF50;
  --error-color: #F44336;
  --info-color: #2196F3;
  --warning-color: #FF9800;
  
  /* Animation Timing */
  --timing-quick: 0.15s;
  --timing-medium: 0.25s;
  --timing-slow: 0.4s;
  --easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-decelerate: cubic-bezier(0, 0, 0.2, 1);
  --easing-accelerate: cubic-bezier(0.4, 0, 1, 1);
}

/* Global animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.media-summaries-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  font-family: 'Poppins', sans-serif;
  animation: fadeIn var(--timing-slow) var(--easing-decelerate);
}

/* Header styling */
.media-summaries-header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: slideUp var(--timing-slow) var(--easing-decelerate);
}

.media-summaries-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.media-summaries-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.media-summaries-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 800px;
  margin: 1rem auto 0;
  line-height: 1.6;
}

/* Tab navigatie */
.tab-navigation {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  animation: fadeIn var(--timing-slow) var(--easing-decelerate);
  animation-delay: 0.1s;
  animation-fill-mode: both;
}

.tab-button {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
  transition: all var(--timing-medium) var(--easing-standard);
  overflow: hidden;
}

.tab-button::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: var(--primary-color);
  transition: all var(--timing-medium) var(--easing-standard);
  transform: translateX(-50%);
  border-radius: 3px 3px 0 0;
}

.tab-button:hover {
  color: var(--primary-color);
}

.tab-button:hover::before {
  width: 40%;
}

.tab-button.active {
  color: var(--primary-color);
}

.tab-button.active::before {
  width: 100%;
}

/* Formulier containers */
.form-container {
  max-width: 700px;
  margin: 0 auto 2.5rem;
  padding: 2rem;
  background-color: var(--background-white);
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: all var(--timing-medium) var(--easing-standard);
  animation: slideUp var(--timing-slow) var(--easing-decelerate);
  animation-delay: 0.2s;
  animation-fill-mode: both;
  position: relative;
  overflow: hidden;
}

.form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
  border-radius: 12px 12px 0 0;
}

.summary-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  margin-bottom: 1.2rem;
  transition: all var(--timing-medium) var(--easing-standard);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #444;
  transition: color var(--timing-quick) var(--easing-standard);
}

.form-group:focus-within label {
  color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--timing-medium) var(--easing-standard);
  background-color: var(--background-white);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: #ccc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-transparent);
}

/* Card styling */
.summary-card {
  background: var(--background-white);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05), 0 1.5px 6px rgba(0,0,0,0.03);
  border-left: 6px solid var(--primary-color);
  padding: 1.5rem 1.2rem 1.2rem 1.2rem;
  margin-bottom: 1.5rem;
  transition: box-shadow var(--timing-medium) var(--easing-standard),
              transform var(--timing-medium) var(--easing-standard);
  cursor: pointer;
  position: relative;
  animation: slideUp var(--timing-medium) var(--easing-decelerate);
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform, box-shadow;
}

.summary-card:hover {
  box-shadow: 0 8px 32px var(--shadow-hover), 0 3px 12px rgba(0,0,0,0.08);
  transform: translateY(-4px);
  border-left-color: var(--primary-hover);
}

.summary-card:active {
  transform: translateY(-2px);
  transition: all var(--timing-quick) var(--easing-accelerate);
}

.summaries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Modal animations */
.summary-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 100;
  overflow-y: auto;
  opacity: 0;
  transition: opacity var(--timing-medium) var(--easing-standard);
}

.summary-modal.show {
  opacity: 1;
}

.summary-modal-content {
  position: relative;
  background-color: #fff;
  margin: 40px auto;
  padding: 30px;
  width: 85%;
  max-width: 900px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(30px) scale(0.98);
  transition: transform var(--timing-medium) var(--easing-decelerate);
}

.summary-modal.show .summary-modal-content {
  transform: translateY(0) scale(1);
}

/* Button animations */
.action-button {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.3rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--timing-medium) var(--easing-standard);
  box-shadow: 0 2px 4px rgba(255,103,0,0.12);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  position: relative;
}

.action-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.7);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.action-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255,103,0,0.18);
}

.action-button:active::after {
  animation: ripple 0.6s linear;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

/* Toast notification enhancements */
.notification-container {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  transition: all var(--timing-medium) var(--easing-standard);
}

.notification-toast {
  min-width: 280px;
  max-width: 400px;
  margin: 0 auto;
  background: #fff;
  color: var(--text-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 1.1rem 1.7rem;
  font-size: 1.08rem;
  font-weight: 500;
  border-left: 6px solid var(--primary-color);
  opacity: 0;
  transform: translateY(-30px) scale(0.98);
  transition: all var(--timing-medium) var(--easing-decelerate);
  pointer-events: auto;
}

.notification-container.show .notification-toast {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.global-loader {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.92);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--timing-medium) var(--easing-standard);
}

.global-loader.show {
  opacity: 1;
}

.loader-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

.no-content-illustration {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
  animation: fadeIn var(--timing-slow) var(--easing-decelerate);
}

/* Search field enhancement */
#summary-search.summary-search {
  border: 2px solid var(--primary-color);
  border-radius: 24px;
  padding: 0.9rem 1.5rem;
  font-size: 1.08rem;
  box-shadow: 0 2px 6px var(--primary-transparent);
  outline: none;
  transition: all var(--timing-medium) var(--easing-standard);
  margin: 0 auto 1.8rem;
  display: block;
  width: 100%;
  max-width: 450px;
  background-color: var(--background-white);
}

#summary-search.summary-search:focus {
  border-color: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-transparent);
  transform: translateY(-1px);
}

/* Audio wave animation */
.audio-animation-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  margin: 15px 0;
  padding: 0 10px;
}

.audio-wave {
  width: 5px;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 5px;
  animation: audio-wave-animation 1.2s ease-in-out infinite;
  transform-origin: bottom;
}

.audio-wave:nth-child(2) {
  animation-delay: 0.2s;
}

.audio-wave:nth-child(3) {
  animation-delay: 0.4s;
}

.audio-wave:nth-child(4) {
  animation-delay: 0.6s;
}

.audio-wave:nth-child(5) {
  animation-delay: 0.8s;
}

@keyframes audio-wave-animation {
  0%, 100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}

/* Toggle Animation Button */
#toggleAudioAnimation {
  display: block;
  margin: 10px auto;
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  background-color: var(--primary-color);
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#toggleAudioAnimation:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

#toggleAudioAnimation:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#toggleAudioAnimation i {
  margin-right: 5px;
}

/* Paused state */
#toggleAudioAnimation.paused {
  background-color: #6c757d;
}

#toggleAudioAnimation.paused:hover {
  background-color: #5a6268;
}

/* Content loader */
.content-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #555;
  font-size: 16px;
  text-align: center;
}

.content-loader i {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #007bff;
}

/* Global Loader */
#loaderContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loaderContainer.show {
  opacity: 1;
  visibility: visible;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.loader i {
  font-size: 2rem;
  color: #007bff;
  margin-bottom: 10px;
}

/* Notification */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 5px;
  background-color: #f8f9fa;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification.show {
  transform: translateY(0);
  opacity: 1;
}

.notification.info {
  border-left: 4px solid #007bff;
}

.notification.success {
  border-left: 4px solid #28a745;
}

.notification.error {
  border-left: 4px solid #dc3545;
}

.notification i {
  margin-right: 10px;
}

/* Audio Player Styles */
.audio-player-container {
  margin: 20px 0;
  padding: 15px;
  background-color: #f7f9fc;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: relative;
}

#audioPlayer {
  width: 100%;
  height: 40px;
  outline: none;
  border-radius: 5px;
}

/* Improved modal animations */
#summaryModal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#summaryModal.show {
  opacity: 1;
}

.summary-modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

#summaryModal.show .summary-modal-content {
  transform: translateY(0);
}

/* Tab system */
.summary-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.summary-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  color: #555;
}

.summary-tab:hover {
  color: #007bff;
  background-color: rgba(0, 123, 255, 0.05);
}

.summary-tab.active {
  color: #007bff;
  border-bottom: 2px solid #007bff;
}

.summary-tab i {
  margin-right: 8px;
}

.tab-content {
  display: none;
  padding: 15px 0;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

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

/* Error message styling */
.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: #721c24;
  background-color: #f8d7da;
  border-radius: 5px;
  text-align: center;
}

.error-message i {
  font-size: 2rem;
  margin-bottom: 15px;
}

/* Modal action buttons */
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 30px;
  gap: 10px;
}

.action-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  background-color: #f0f0f0;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.action-button i {
  margin-right: 8px;
}

.action-button:hover {
  background-color: #e0e0e0;
}

.action-button.delete-button {
  background-color: #f8d7da;
  color: #721c24;
}

.action-button.delete-button:hover {
  background-color: #f5c6cb;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
  .media-summaries-container {
    padding: 15px;
  }
  
  .summary-modal-content {
    padding: 20px;
    width: 95%;
}

  .summary-tab {
    padding: 8px 15px;
    font-size: 14px;
}

  .action-button {
    padding: 6px 12px;
    font-size: 14px;
}

  .audio-player-container {
    margin: 15px 0;
}

  .summary-section h3 {
    font-size: 18px;
  }
}

@media screen and (max-width: 480px) {
  .media-summaries-container {
    padding: 10px;
  }
  
  .summary-modal-content {
    padding: 15px;
}

  .summary-tabs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 5px;
}

  .summary-tab {
    padding: 6px 10px;
    font-size: 13px;
    flex: 0 0 auto;
  }
  
  .audio-animation-container {
    height: 40px;
}

  .action-button {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .notification {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
}
}

/* No Content Message */
.no-content-message {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background-color: #f8f9fa;
  border-radius: 5px;
  color: #6c757d;
  font-style: italic;
}

.no-content-message i {
  margin-right: 10px;
  font-size: 1.2rem;
}

/* iFrame Container */
.iframe-container {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  margin: 20px 0;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Vocabulary Items */
.vocabulary-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.vocabulary-item {
  background-color: #f8f9fa;
  border-radius: 5px;
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
}

.dutch-word {
  font-weight: bold;
  color: #343a40;
  margin-bottom: 5px;
}

.english-word {
  color: #6c757d;
  font-style: italic;
}

/* Summary Section Styling */
.summary-section {
  margin-bottom: 30px;
}

.summary-section h3 {
  margin-bottom: 15px;
  color: #343a40;
  font-weight: 600;
}

.summary-section p {
  line-height: 1.6;
}

.summary-header {
  margin-bottom: 25px;
}

.summary-header h2 {
  margin-bottom: 10px;
  color: #212529;
  }
  
.summary-metadata {
  display: flex;
  gap: 15px;
  color: #6c757d;
  font-size: 14px;
  }
  
.summary-metadata span {
  display: flex;
    align-items: center;
  }
  
.summary-metadata i {
  margin-right: 5px;
  }
  
.key-points-list {
  padding-left: 20px;
  }
  
.key-points-list li {
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Close Button */
.close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  transition: color 0.2s ease;
  }
  
.close-button:hover {
  color: #333;
}

/* Improved Animations */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(255, 103, 0, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 103, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 103, 0, 0); }
}

@keyframes scale-in {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Enhanced Button States */
.submit-btn, .action-button, .tab-button {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.submit-btn:before, .action-button:before, .tab-button:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out;
  z-index: -1;
}

.submit-btn:hover:before, .action-button:hover:before, .tab-button:hover:before {
  width: 300px;
  height: 300px;
}

.submit-btn:active, .action-button:active, .tab-button:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

.submit-btn:focus, .action-button:focus, .tab-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 103, 0, 0.3);
}

.submit-btn.active, .action-button.active {
  transform: scale(0.95);
}

.submit-btn {
  background: linear-gradient(135deg, #ff6700 0%, #ff8533 100%);
  box-shadow: 0 4px 15px rgba(255, 103, 0, 0.2);
  border: none;
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #ff7a1a 0%, #ff944d 100%);
  box-shadow: 0 7px 20px rgba(255, 103, 0, 0.3);
  transform: translateY(-2px);
}

.submit-btn:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.submit-btn .btn-icon {
  margin-right: 8px;
  font-size: 18px;
}

/* Improved Summary Cards */
.summary-card {
  transition: all 0.3s ease;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transform-origin: center bottom;
}

.summary-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 103, 0, 0.1);
}

.summary-card[data-favorite="true"] {
  box-shadow: 0 4px 20px rgba(255, 103, 0, 0.1);
  border-left: 3px solid #ff6700;
}

.summary-card:hover .summary-title {
  color: #ff6700;
}

.summary-card .action-button {
  opacity: 0.9;
  transform: translateY(5px);
  transition: all 0.3s ease;
}

.summary-card:hover .action-button {
  opacity: 1;
  transform: translateY(0);
}

.summary-card .summary-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

.summary-card:hover .summary-actions {
  background: rgba(255, 103, 0, 0.05);
}

.summary-level {
  background: #fff2e6;
  color: #ff6700;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  display: inline-block;
}

/* Enhanced Loading States */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.loader i {
  font-size: 28px;
  color: #ff6700;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.loader span {
  font-size: 16px;
  color: #666;
  margin-top: 10px;
}

#loaderContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

#loaderContainer.show {
  opacity: 1;
  visibility: visible;
}

.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.global-loader.show {
  opacity: 1;
  visibility: visible;
}

.loader-spinner svg {
  animation: float 2s ease-in-out infinite;
}

/* Enhanced Modal */
.summary-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.summary-modal.show {
  opacity: 1;
}

.summary-modal-content {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 25px;
  position: relative;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.summary-modal.show .summary-modal-content {
  transform: scale(1);
  opacity: 1;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close:hover {
  color: #ff6700;
  background-color: rgba(255, 103, 0, 0.1);
  transform: rotate(90deg);
}

/* Enhanced Tabs */
.summary-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
  gap: 5px;
}

.summary-tab {
  padding: 12px 20px;
  border: none;
  background: none;
  cursor: pointer;
  color: #666;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 8px 8px 0 0;
}

.summary-tab:after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 3px;
  background: #ff6700;
  transition: width 0.3s ease;
}

.summary-tab:hover {
  color: #ff6700;
  background-color: rgba(255, 103, 0, 0.05);
}

.summary-tab:hover:after {
  width: 100%;
}

.summary-tab.active {
  color: #ff6700;
  font-weight: 600;
}

.summary-tab.active:after {
  width: 100%;
}

.tab-content {
  display: none;
  animation: scale-in 0.3s forwards;
}

.tab-content.active {
  display: block;
}

/* Improved Notifications */
.notification {
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  background: white;
  color: #333;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transform: translateX(120%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border-left: 4px solid #ccc;
  max-width: 350px;
}

.notification:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

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

.notification.success {
  border-left-color: #4CAF50;
  background: linear-gradient(to right, rgba(76, 175, 80, 0.1), transparent 50%);
}

.notification.error {
  border-left-color: #F44336;
  background: linear-gradient(to right, rgba(244, 67, 54, 0.1), transparent 50%);
}

.notification.info {
  border-left-color: #2196F3;
  background: linear-gradient(to right, rgba(33, 150, 243, 0.1), transparent 50%);
}

.notification i {
  margin-right: 10px;
  font-size: 20px;
}

.notification.success i { color: #4CAF50; }
.notification.error i { color: #F44336; }
.notification.info i { color: #2196F3; }

#notificationContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Audio Player Enhancements */
.audio-player-container {
  background: linear-gradient(to right, #fff6f0, #fff);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

#audioPlayer {
  width: 100%;
  height: 50px;
  outline: none;
  border-radius: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.audio-animation-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  margin: 20px 0;
}

.audio-wave {
  width: 5px;
  height: 40px;
  background: #ff6700;
  margin: 0 3px;
  border-radius: 2px;
  animation: audio-wave-animation 1.2s infinite ease-in-out;
}

/* Mobile Optimization */
@media screen and (max-width: 768px) {
  .summary-modal-content {
    width: 95%;
    padding: 15px;
  }
  
  .summary-tab {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  .summary-tabs {
    flex-wrap: wrap;
  }
  
  .submit-btn {
    width: 100%;
  }
  
  .summaries-grid {
    grid-template-columns: 1fr;
  }
  
  .notification {
    max-width: 90%;
  }
}

/* Floating Add Button for Mobile */
.floating-add-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ff6700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(255, 103, 0, 0.3);
  z-index: 100;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: pulse-glow 2s infinite;
  display: none;
}

.floating-add-btn i {
  font-size: 24px;
}

.floating-add-btn:hover {
  transform: scale(1.1) rotate(90deg);
}

@media screen and (max-width: 768px) {
  .floating-add-btn {
    display: flex;
  }
}

.highlight-new {
  animation: pulse-glow 2s infinite;
}

/* Empty State Enhancement */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  margin: 20px 0;
  transition: all 0.3s ease;
}

.empty-state img {
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

.empty-state:hover img {
  transform: scale(1.1);
}

.empty-state .no-content {
  color: #666;
  font-size: 16px;
  max-width: 300px;
  margin: 15px auto 0;
}

/* Vocabulary List Enhancements */
.vocabulary-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.vocabulary-item {
  background: #fff6f0;
  padding: 12px 15px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  border-left: 3px solid #ff6700;
}

.vocabulary-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.dutch-word {
  font-weight: bold;
  color: #ff6700;
  font-size: 16px;
  margin-bottom: 5px;
}

.english-word {
  color: #666;
  font-size: 14px;
}

/* Search Enhancement */
.summary-search {
  width: 100%;
  max-width: 350px;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin: 0 auto 20px;
  display: block;
}

.summary-search:focus {
  border-color: #ff6700;
  box-shadow: 0 5px 15px rgba(255, 103, 0, 0.1);
  outline: none;
}

/* Search and Filter Styles */
.search-filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: center;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 450px;
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}

.filter-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  min-width: 160px;
}

.filter-select:focus {
  border-color: #ff6700;
  box-shadow: 0 5px 15px rgba(255, 103, 0, 0.1);
  outline: none;
}

.filter-btn {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  border-color: #ff6700;
  color: #ff6700;
}

.filter-btn.active {
  background-color: #fff2e6;
  border-color: #ff6700;
  color: #ff6700;
}

.filter-btn i {
  font-size: 14px;
}

.reset-filters-btn {
  background-color: #f5f5f5;
  color: #666;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.reset-filters-btn:hover {
  background-color: #eee;
  color: #ff6700;
}

/* File Upload Preview */
.file-upload-container {
  margin-bottom: 10px;
  position: relative;
}

.file-preview {
  margin-top: 10px;
}

.file-preview-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #fff6f0;
  border-radius: 8px;
  margin-bottom: 10px;
  animation: fadeIn 0.3s ease;
}

.file-preview-item i {
  font-size: 24px;
  color: #ff6700;
  margin-right: 15px;
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 3px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.file-size {
  font-size: 12px;
  color: #666;
}

.remove-file {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.remove-file:hover {
  background-color: rgba(255, 103, 0, 0.1);
  color: #ff6700;
}

.form-help-text {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}

/* Highlight animation for elements */
@keyframes highlight-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 103, 0, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(255, 103, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 103, 0, 0); }
}

.highlight-new {
  animation: highlight-pulse 2s ease-out;
  border-radius: 12px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .search-filter-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-wrapper {
    max-width: none;
  }
  
  .filter-options {
    justify-content: space-between;
  }
  
  .filter-select, .filter-btn {
    flex: 1;
  }
}

/* Fix button click issues */
.tab-button, .submit-btn, .action-button, .content-type-tab, button {
  position: relative;
  z-index: 2;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.tab-button:before, .action-button:before, .submit-btn:before {
  z-index: -1;
}

.submit-btn, .action-button, .tab-button {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Remove any potential overlaps */
.form-actions {
  position: relative;
  z-index: 5;
}

/* Ensure pseudo-elements don't block clicks */
.submit-btn *, .action-button *, .tab-button * {
  pointer-events: none;
}

/* Make buttons look active when clicked for better feedback */
.submit-btn:active, .action-button:active, .tab-button:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* Fix any potential transform issues that might affect clicking */
.tab-navigation, .form-container, .content-tabs {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Fix mobile button rendering */
@media (max-width: 767px) {
  .tab-button, .submit-btn, .action-button, .content-type-tab {
    padding: 10px 15px;
    min-height: 44px; /* Better for mobile touch targets */
  }
}

/* Force hardware acceleration for smoother interactions */
.submit-btn, .tab-button, .action-button {
  will-change: transform;
  transform: translateZ(0);
}

/* CRITICAL BUTTON FIX - DO NOT REMOVE */
#youtube-tab, #book-tab, #youtube-submit, #book-submit {
  cursor: pointer !important;
  z-index: 9999 !important; 
  position: relative !important;
  user-select: none !important;
}

#youtube-tab::before, #book-tab::before, 
#youtube-submit::before, #book-submit::before {
  content: none !important;
}

.tab-button, .submit-btn {
  pointer-events: auto !important;
}

/* Force hardware acceleration and improve click responsiveness */
.tab-button, .submit-btn, .action-button, .content-type-tab {
  -webkit-tap-highlight-color: transparent;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

/* Remove any potential click blockers */
.tab-button:before, .action-button:before, .submit-btn:before {
  z-index: -1 !important;
}

/* Ensure pointer events don't interfere */
.tab-button span, .tab-button i, .submit-btn span, .submit-btn i {
  pointer-events: none;
}

/* Improve mobile touch targets */
@media (max-width: 767px) {
  .tab-button, .submit-btn, .action-button {
    min-height: 44px;
    padding: 12px 15px;
  }
} 