/* Paleta de cores customizada para Bootstrap */
:root {
  --primary: #2563eb;
  --secondary: #64748b;
  --background: #f8fafc;
  --accent: #38bdf8;
  --text: #1e293b;
  --shadow: 0 2px 8px rgba(0,0,0,0.07);
  --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 56px;
  overflow-x: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Remover apenas header customizado das páginas de conteúdo, não o Bootstrap navbar */
.fakenews-page header,
.fakenews-page .hamburger,
.fakenews-page .hamburger span,
.senhas-page header,
.senhas-page .hamburger,
.senhas-page .hamburger span,
.golpes-page header,
.golpes-page .hamburger,
.golpes-page .hamburger span,
.privacidade-page header,
.privacidade-page .hamburger,
.privacidade-page .hamburger span,
.navegacao-page header,
.navegacao-page .hamburger,
.navegacao-page .hamburger span,
.furto-celular-page header,
.furto-celular-page .hamburger,
.furto-celular-page .hamburger span {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  position: static !important;
  background: none !important;
}

/* Bootstrap customizations */
.navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
}

.bg-primary {
  background-color: var(--primary) !important;
}

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

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

/* Enhanced Menu fixo inferior tipo app */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
  display: flex !important;
  justify-content: space-around;
  align-items: center;
  padding: 0;
  z-index: 1050;
  height: 56px;
  overflow-x: auto;
  overflow-y: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.2), transparent);
}

.bottom-nav a {
  color: var(--secondary);
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
  min-height: 0;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  height: 54px;
  box-sizing: border-box;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  flex: 1;
  max-width: 80px;
}

.bottom-nav a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--primary);
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: -1;
}

.bottom-nav a:hover::before,
.bottom-nav a:focus::before {
  width: 100%;
  height: 100%;
  opacity: 0.1;
}

.bottom-nav a i {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
  transition: all 0.3s ease;
}

.bottom-nav a span {
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.1rem;
  line-height: 1;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-nav a.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.bottom-nav a.active i {
  transform: scale(1.1);
}

.bottom-nav a.active span {
  font-weight: 600;
}

.bottom-nav a:hover,
.bottom-nav a:focus {
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.bottom-nav a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bottom-nav a:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

/* Pulse animation for active link */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.bottom-nav a.active {
  animation: pulse 2s infinite;
}

/* Loading state */
.bottom-nav a.loading i {
  animation: spin 1s linear infinite;
}

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

/* Container adjustments for Bootstrap */
.container:not(.infographic-container) {
  max-width: 900px;
}

/* Main content for non-Bootstrap pages */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem 1rem 1rem;
}

/* Bootstrap page specific adjustments */
.container.my-4 {
  padding-bottom: 1rem;
}

h1, h2, h3 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

p, li {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Estilização do infográfico */
.infographic-container {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 2rem 0;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  max-width: none !important;
}

.header {
  background: var(--gradient-bg);
  color: white;
  padding: 1.5rem;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.content {
  padding: 2rem;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tip-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37,99,235,0.1);
}

.tip-icon {
  font-size: 2rem;
  min-width: 50px;
  text-align: center;
  background: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tip-text h3 {
  margin: 0 0 0.5rem 0;
  color: var(--primary);
  font-size: 1.2rem;
}

.tip-text p {
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.tip-text ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.2rem;
}

.tip-text li {
  margin-bottom: 0.4rem;
  color: var(--text);
  position: relative;
  padding-left: 0.5rem;
}

.tip-text li::before {
  content: '•';
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: -0.8rem;
}

.tip-text strong {
  color: var(--primary);
  font-weight: 700;
}

.tip-text p + ul {
  margin-top: 0.8rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  border-radius: 12px !important;
  box-shadow: var(--shadow);
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 4px 16px rgba(37,99,235,0.08);
}

.card .icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.7rem;
}

.card button, .btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7em 1.2em;
  font-size: 1rem;
  margin-top: 1em;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.card button:hover, .btn:hover:not(.btn-primary) {
  background: var(--accent);
  transform: translateY(-1px);
}

img.responsive-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

img.responsive-img:hover, img.responsive-img:focus {
  box-shadow: 0 4px 16px rgba(37,99,235,0.13);
  outline: none;
}

/* Modal para infográfico */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(30,41,59,0.85);
  justify-content: center;
  align-items: center;
  animation: fadeInModal 0.25s cubic-bezier(.4,0,.2,1);
}

.modal.active {
  display: flex;
}

.modal-content {
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 2rem;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
}

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

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.98);}
  to { opacity: 1; transform: scale(1);}
}

/* Acessibilidade e foco */
a, button, .btn, input, textarea {
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

a:focus, .btn:focus, button:focus, input:focus, textarea:focus {
  box-shadow: 0 0 0 2px var(--accent);
  border-color: var(--accent);
  outline: none;
}

nav a:focus {
  background: rgba(56,189,248,0.15);
  color: var(--accent);
}

.card:focus-within {
  box-shadow: 0 0 0 3px var(--accent);
}

.card button:focus, .btn:focus {
  background: var(--accent);
}

img.responsive-img:focus {
  box-shadow: 0 0 0 3px var(--accent), var(--shadow);
}

/* Responsividade */
@media (max-width: 700px) {
  main {
    padding: 1.2rem 0.5rem 1rem 0.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .content {
    padding: 1rem;
  }
  
  .tip-item {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }
  
  .tip-icon {
    align-self: center;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
  }
  
  .bottom-nav {
    font-size: 1rem;
    padding: 0;
    height: 54px;
  }
  
  .bottom-nav a {
    font-size: 1rem;
    gap: 0;
    padding: 0 0.3em;
    height: 52px;
  }
}

@media (max-width: 400px) {
  .header {
    font-size: 1.2rem;
    padding: 1rem;
  }
  
  .tip-item {
    padding: 0.8rem;
    margin-bottom: 1rem;
  }
  
  .tip-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  
  .card {
    padding: 1rem 0.5rem;
  }
  
  .modal-content {
    padding: 0.5rem;
  }
}

/* Enhanced hero section styling */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 3rem 0;
  margin: -1.5rem -15px 2rem -15px;
  border-radius: 0 0 24px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  color: white;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-section p {
  font-size: 1.3rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Enhanced card styling */
.category-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: white;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-bg);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.category-card:hover::before {
  transform: scaleX(1);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(37,99,235,0.15);
}

.category-card .icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(56,189,248,0.1));
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto 1rem auto;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.category-card:hover .icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(37,99,235,0.2), rgba(56,189,248,0.2));
}

.category-card .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1rem 1.5rem 1.5rem 1.5rem;
}

.category-card .card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  min-height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.category-card .card-text {
  color: var(--secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  display: flex;
  align-items: center;
  text-align: center;
  min-height: 4.8rem;
}

.category-card .btn {
  background: var(--primary);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: auto;
  align-self: center;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card .btn::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 0.5s ease;
}

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

.category-card .btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56,189,248,0.3);
}

/* Enhanced section styling */
.content-section {
  margin-bottom: 4rem;
  padding: 2rem 0;
}

.content-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.content-section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-bg);
  border-radius: 2px;
}

/* About and contact sections */
.info-section {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
}

.info-section h2 {
  text-align: left;
  margin-bottom: 1.5rem;
}

.info-section h2::after {
  display: none;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 2px solid var(--primary);
  margin-top: 1rem;
}

.github-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

/* Fix external links styling */
.tip-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--primary);
  transition: all 0.2s ease;
}

.tip-text a:hover {
  background: var(--primary);
  color: white;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  border-bottom: none;
}

/* Improve focus states for better accessibility */
.tip-item:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Fix button hover states consistency */
.btn:hover {
  background: var(--accent) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56,189,248,0.3);
}

/* Improve loading states */
.tip-item {
  opacity: 1;
  animation: fadeInUp 0.6s ease-out;
}

/* Fix responsive issues */
@media (max-width: 576px) {
  .tip-text {
    text-align: left;
  }
  
  .tip-item {
    text-align: left;
  }
}

/* Performance improvements - reduce animations on slower devices */
@media (prefers-reduced-motion: reduce) {
  .tip-item,
  .category-card,
  .btn,
  .animate-on-scroll {
    animation: none;
    transition: none;
  }
  
  .tip-item:hover,
  .category-card:hover {
    transform: none;
  }
}

/* Enhanced responsive design */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
    margin: -1.5rem -15px 1.5rem -15px;
  }
  
  .hero-section h1 {
    font-size: 2.2rem;
  }
  
  .hero-section p {
    font-size: 1.1rem;
  }
  
  .content-section h2 {
    font-size: 2rem;
  }
  
  .category-card .icon {
    width: 60px;
    height: 60px;
    font-size: 2.2rem;
  }
  
  .category-card .card-text {
    min-height: 3.6rem;
    font-size: 0.95rem;
  }
  
  .info-section {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 1.8rem;
  }
  
  .content-section h2 {
    font-size: 1.7rem;
  }
  
  .category-card {
    margin-bottom: 1rem;
  }
  
  .category-card .card-text {
    min-height: 3.2rem;
    font-size: 0.9rem;
  }
  
  .category-card .btn {
    min-width: 120px;
    padding: 0.65rem 1.2rem;
  }
}

/* Enhanced navigation for infographic pages */
.bottom-nav a[href*=".html"]:not([href="index.html"]) {
  position: relative;
}

.bottom-nav a[href*=".html"]:not([href="index.html"])::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bottom-nav a[href*=".html"]:not([href="index.html"]):hover::after {
  opacity: 1;
}

/* Special styling for navigation arrows */
.bottom-nav a[href*=".html"] i.fa-arrow-left,
.bottom-nav a[href*=".html"] i.fa-arrow-right {
  color: var(--accent);
}

.bottom-nav a[href*=".html"]:hover i.fa-arrow-left,
.bottom-nav a[href*=".html"]:hover i.fa-arrow-right {
  color: var(--primary);
  transform: scale(1.2);
}

/* Mobile enhancements */
@media (max-width: 768px) {
  .bottom-nav {
    height: 60px;
    padding: 0.25rem 0;
  }
  
  .bottom-nav a {
    height: 56px;
    padding: 0.25rem 0.25rem;
    max-width: none;
    flex: 1;
  }
  
  .bottom-nav a i {
    font-size: 1.2rem;
  }
  
  .bottom-nav a span {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .bottom-nav a span {
    font-size: 0.65rem;
  }
  
  .bottom-nav a {
    padding: 0.25rem 0.125rem;
  }
}

/* Audio Widget Styling */
.audio-widget {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 2rem 0;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.audio-widget:hover {
  box-shadow: 0 8px 24px rgba(37,99,235,0.12);
  transform: translateY(-2px);
}

.audio-header {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.audio-header i {
  font-size: 1.2rem;
}

.audio-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: white;
}

.audio-player {
  padding: 1.5rem;
}

.audio-player audio {
  width: 100%;
  height: 54px;
  border-radius: 8px;
  outline: none;
  margin-bottom: 1rem;
}

.audio-player audio:focus {
  box-shadow: 0 0 0 3px var(--accent);
}

.audio-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary);
  font-size: 0.9rem;
  background: rgba(37,99,235,0.05);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.audio-info i {
  color: var(--primary);
  font-size: 1rem;
}

/* Custom audio controls for better browser support */
.audio-player audio::-webkit-media-controls-panel {
  background-color: #f8fafc;
  border-radius: 6px;
}

.audio-player audio::-webkit-media-controls-play-button {
  background-color: var(--primary);
  border-radius: 50%;
}

.audio-player audio::-webkit-media-controls-timeline {
  background-color: #e2e8f0;
  border-radius: 25px;
  margin-left: 10px;
  margin-right: 10px;
}

.audio-player audio::-webkit-media-controls-current-time-display,
.audio-player audio::-webkit-media-controls-time-remaining-display {
  color: var(--text);
  text-shadow: none;
  font-size: 0.85rem;
}

/* Firefox audio controls */
.audio-player audio::-moz-range-track {
  background-color: #e2e8f0;
  border-radius: 25px;
}

.audio-player audio::-moz-range-thumb {
  background-color: var(--primary);
  border-radius: 50%;
  border: none;
}

/* Loading state for audio */
.audio-widget.loading .audio-header {
  background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
}

.audio-widget.loading .audio-header::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: auto;
}

/* Error state for audio */
.audio-widget.error .audio-header {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.audio-widget.error .audio-info {
  background: rgba(220,38,38,0.1);
  border-left-color: #dc2626;
  color: #dc2626;
}

.audio-widget.error .audio-info i {
  color: #dc2626;
}

/* Responsive audio widget */
@media (max-width: 768px) {
  .audio-widget {
    margin: 1.5rem 0;
  }
  
  .audio-header {
    padding: 0.875rem 1rem;
  }
  
  .audio-header h3 {
    font-size: 1rem;
  }
  
  .audio-player {
    padding: 1rem;
  }
  
  .audio-player audio {
    height: 48px;
  }
  
  .audio-info {
    font-size: 0.85rem;
    padding: 0.625rem 0.875rem;
  }
}

@media (max-width: 480px) {
  .audio-header {
    padding: 0.75rem;
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
  }
  
  .audio-header h3 {
    font-size: 0.95rem;
  }
  
  .audio-player {
    padding: 0.875rem;
  }
  
  .audio-player audio {
    height: 44px;
  }
  
  .audio-info {
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
    font-size: 0.8rem;
  }
}

/* Dark mode support for audio widget */
@media (prefers-color-scheme: dark) {
  .audio-widget {
    background: #1e293b;
    border-color: #334155;
  }
  
  .audio-info {
    background: rgba(56,189,248,0.1);
    color: #cbd5e1;
  }
  
  .audio-player audio::-webkit-media-controls-panel {
    background-color: #334155;
  }
  
  .audio-player audio::-webkit-media-controls-current-time-display,
  .audio-player audio::-webkit-media-controls-time-remaining-display {
    color: #cbd5e1;
  }
}

/* Accessibility improvements for audio */
.audio-player audio:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .audio-widget {
    border: 3px solid var(--primary);
  }
  
  .audio-header {
    background: var(--primary);
  }
  
  .audio-info {
    border: 2px solid var(--primary);
    background: white;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .audio-widget {
    transition: none;
  }
  
  .audio-widget:hover {
    transform: none;
  }
  
  .audio-widget.loading .audio-header::after {
    animation: none;
  }
}