/* defi.css */
@import "colors.css";

/* Seções Gerais */
.content-section, 
.platform-section, 
.video-section, 
.simulator-section {
    padding: 4rem 8rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 8rem 0 6rem;
    position: relative;
}

.hero-content {
    color: var(--primary-color);
    max-width: 800px;
    margin: 0 auto;
}

.gradient-text {
    background: linear-gradient(90deg, #552194, #854ad3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 4rem; /* Tamanho aumentado para o título */
    margin-bottom: 1.5rem;
    display: block;
}
body.dark .gradient-text {
    background: linear-gradient(90deg, #8a63d6, #54398b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--acsent-color);
}

/* Seção "Qué es DeFi" */
.defi-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    min-height: 600px; /* Altura mínima garantida */
  padding: 2.5rem !important;
}
/* Comparação lado a lado */
.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
  }
  .traditional, .defi-comp {
    padding: 1.2rem;
    border-radius: 12px;
  }
  .defi-comp {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #44ff44;
  }
  /* Elementos simplificados */
.simple-steps {
    counter-reset: step;
    padding-left: 1.5rem;
  }
  .simple-steps li {
    margin: 1rem 0;
    position: relative;
  }

.traditional {
  background: rgba(255, 0, 0, 0.05);
  border: 1px solid #ff4444;
}

body.dark .defi-card {
    box-shadow: rgba(0, 0, 0, 0.2) 0px 7px 29px 0px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.simple-steps li::before {
    content: counter(step);
    counter-increment: step;
    position: absolute;
    left: -1.8rem;
    width: 1.5rem;
    height: 1.5rem;
    background: #854ad3;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 1.5rem;
  }
  .example {
    background: rgba(133, 74, 211, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #854ad3;
    font-style: italic;
  }
  .warning-note {
    background: rgba(255, 204, 0, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #ffcc00;
  }
  /* Tipografia mais amigável */
.intro-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 2rem;
  }
  .simple-list li {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
    position: relative;
  }
  .simple-list li::before {
    content: "•";
    color: #854ad3;
    position: absolute;
    left: 0;
  }

/* Cards de Protocolos */
.platform-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 0;
}

.platform-card {
    flex: 0 1 350px;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 25px;
    border: 1px solid rgba(133, 74, 211, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.platform-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

body.light .platform-card:hover {
    box-shadow: rgba(128, 48, 208, 0.4) 0px 7px 29px 15px;
}

.platform-card img {
    width: 72px;
    height: 72px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.platform-card:hover img {
    transform: scale(1.1);
}

.video-card {
    flex: 0 0 33.33%;
    padding: 0 10px;
    box-sizing: border-box;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    max-width: 320px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-card.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    z-index: 1000;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
}


/* Títulos das Seções */
.content-section h2,
.platform-section h2,
.video-section h2,
.simulator-section h2 {
    font-size: 2.4rem;
    margin: 6rem 0 3rem;
    padding: 0 8rem;
    text-align: center;
}

/* Modo Escuro */
body.dark {
    --card-bg: #1f1f1f;
    --text-color: #ffffff;
}

body.dark .platform-card {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 12px rgba(89, 88, 88, 0.3);
}

body.dark .platform-card:hover {
    box-shadow: 0 10px 20px rgba(142, 141, 141, 0.4);
}

body.dark .defi-list li {
    background: rgba(255, 255, 255, 0.05);
}

/* Footer */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

footer {
    width: 100%;
    flex-shrink: 0;
    background-color: var(--footer-bg);
    padding: 2rem 0;
    text-align: center;
}

/* Responsividade */
@media (max-width: 1200px) {
    .content-section,
    .platform-section,
    .video-section,
    .simulator-section {
        padding: 4rem;
    }

    .platform-grid {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 8rem 0 4rem;
    }

    .gradient-text {
        font-size: 2.4rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .content-section,
    .platform-section,
    .video-section,
    .simulator-section {
        padding: 2rem;
    }

    .content-section h2,
    .platform-section h2,
    .video-section h2,
    .simulator-section h2 {
        padding: 0 1rem;
        font-size: 1.8rem;
        margin: 4rem 0 2rem;
    }

    .platform-card {
        flex: 0 1 100%;
        max-width: 400px;
    }

    .video-card {
        flex: 0 0 100%;
    }
}

/* Botões e Simulador */
.platform-card .btn-defi {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.platform-card {
    transform: scale(1.05);
    box-shadow: 0px 0px 15px rgba(203, 203, 204, 0.7);
}
.btn-defi:hover {
    transform: translateY(-3px); /* Elevação ao passar o mouse */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  }

.simulator-section {
    padding: 4rem 8rem;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.simulator-card {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    padding: 2rem;
    border-radius: 16px; /* Bordas arredondadas */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Sombra suave */
    margin: 2rem auto;
    max-width: 600px;
  }

body.dark .simulator-card {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.simulator-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.input-group label {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.input-group input {
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--blog);
    width: 100%;
    background: var(--card-bg);
    color: var(--text-color);
}

.btn-defi {
    background: linear-gradient(90deg, #f7f5f5, #b5b1b1); /* Gradiente no botão */
    color: #030000;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 99px; /* Bordas bem arredondadas */
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  #simulatorResult {
    margin-top: 2rem;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.5s ease;
  }
  #simulatorResult.show {
    opacity: 1; /* Aparece suavemente */
  }

/* WhyCM Container */
.whycm-container {
    padding-top: 12rem; /* Ajustado para abaixar o título */
}

.whycm-container h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.whycm-container p {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--acsent-color);
}

.advantage-desc {
    font-size: 0.875rem;
    font-weight: 300;
}
.video-section {
  padding: 4rem 8rem;
  text-align: center;
}

.video-thumbnails {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem 0;
  justify-content: center;
}

.thumbnail {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  min-width: 150px;
  flex: 0 0 calc(100% / 3); /* Cada miniatura ocupa 1/3 do espaço visível */
    max-width: calc(100% / 3);
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
}

.thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  }
  /* Estado ativo */
.thumbnail.active {
    transform: scale(0.95);
    filter: brightness(1.1);
  }
/* Feedback de erro */
.thumbnail.error {
    animation: shake 0.5s;
    border: 2px solid #ff4444;
  }
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
  }
/* Mensagem de erro */
.video-error {
    background: rgba(255, 0, 0, 0.1);
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
  }
  .retry-btn {
    background: #854ad3;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
  }

.thumbnail img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 5px;
}

.thumbnail p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-color);
}

/* Modo Oscuro */
body.dark .thumbnail {
  background: #2a2a2a;
  color: #fff;
}

body.dark .thumbnail p {
  color: #ddd;
}
.video-section {
    padding: 4rem 8rem;
    text-align: center;
  }
  
  /* Container principal do vídeo */
.video-player-container {
  width: 100%;
  max-width: 1280px; /* Tamanho similar ao YouTube */
  margin: 2rem auto;
  padding: 0 20px;
}
  
  .video-player {
    position: relative;
    padding-bottom: 56.25%; /* Relação 16:9 */
    height: 0;
  }
  .video-title {
    font-size: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    color: var(--primary-color);
    transition: opacity 0.3s ease;
  }
  .thumbnail.updating {
    opacity: 0.7;
    transform: scale(0.95);
  }
  .thumbnail-image {
    transition: opacity 0.3s ease;
  }
  
  .video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
  }
  
  /* Carrusel */
  .carousel {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
  }
  
  .carousel-inner {
    transition: transform 0.5s ease-in-out;
  }
  .thumbnail.clone {
    opacity: 0.5;
    pointer-events: none;
  }
  
  .thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
  }
  
  .thumbnail p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #333;
    text-align: center;
  }
  
  /* Botones de Navegación */
  .carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(94, 10, 187, 0.5);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.3s ease;
  }
  
  .carousel-control:hover {
    background: rgba(71, 10, 140, 0.5);
    transform: translateY(-50%) scale(1.1);
  }
  
  .prev {
    left: 10px;
  }
  
  .next {
    right: 10px;
  }
  
  /* Indicadores de Paginación */
  .carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
  }
  
  .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  .indicator.active {
    background: #333;
  }
  .input-group select {
    width: 100%;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--blog);
    background: var(--card-bg);
    color: var(--text-color);
  }
  .input-group label i {
    margin-right: 0.5rem;
    color: #2575fc; /* Cor que combina com o gradiente */
  }
  @media (max-width: 768px) {
    .simulator-section {
      padding: 2rem;
    }
    .simulator-card {
      padding: 1.5rem;
    }
    .input-group input,
    .input-group select {
      font-size: 0.9rem; /* Ajusta o texto em telas menores */
    }
  }
  body.light {
    --card-bg: #ffffff; /* Fundo branco */
    --text-color: #000000; /* Texto preto */
}
body.light .input-group input,
body.light .input-group select {
    background: #ffffff; /* Fundo branco */
    color: #000000; /* Texto preto */
    border: 1px solid #ccc; /* Borda cinza claro para combinar */
}
body.dark .input-group input,
body.dark .input-group select {
    background: #1f1f1f; /* Fundo escuro */
    color: #ffffff; /* Texto branco */
    border: 1px solid #555; /* Borda cinza escuro */
}
/* Estilo do título clicável */
.defi-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: rgba(133, 74, 211, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  /* Mostra o conteúdo quando ativo */
.defi-list li.active .defi-content {
    display: block;
  }
  
  
  /* Rotaciona a flecha quando ativo */
  .defi-list li.active .defi-toggle i:last-child {
    transform: rotate(180deg);
  }
  
  
  .defi-item:hover .defi-toggle {
    background: rgba(133, 74, 211, 0.1); /* Efeito hover */
  }
  
  /* Estilo da lista */
  .defi-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
  }
  
  /* Estilo do item da lista */
.defi-item {
    margin: 1rem 0;
    cursor: pointer;
  }
  
  
  .defi-toggle i {
    font-size: 1.8rem;
    color: #854ad3; /* Cor do ícone */
  }
  
  .defi-toggle i:last-child {
    transition: transform 0.3s ease;
  }
  .defi-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* Quando ativo, exibe o texto */
.defi-item.active .defi-content {
    max-height: 300px; /* Ajuste se necessário */
    padding: 1rem 1.2rem;
    margin-top: 0.5rem;
  }
  
  /* Rotação da seta ao expandir */
  .defi-item.active .defi-toggle i:last-child {
    transform: rotate(180deg);
  }
  /* Modo escuro */
body.dark .defi-toggle {
    background: rgba(255, 255, 255, 0.05);
  }
  body.dark .defi-accordion-item.active .defi-content {
    background: rgba(255, 255, 255, 0.02);
  }
  
  body.dark .defi-content {
    background: rgba(255, 255, 255, 0.05);
  }
  /* teste 
  /* defi.css - Atualizações para a seção DeFi */
.defi-accordion-item {
    margin: 1.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .defi-toggle:hover {
    transform: scale(1.02);
    background: rgba(133, 74, 211, 0.1);
  }
  .defi-toggle i:first-child {
    margin-right: 1rem;
    font-size: 1.4em;
    transition: transform 0.3s ease;
  }
  .arrow-icon {
    transition: transform 0.3s ease !important;
  }
  .defi-content p {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease 0.2s;
  }
  /* Estado Ativo */
.defi-accordion-item.active .defi-content {
    max-height: 500px;
    padding: 2rem;
    background: rgba(133, 74, 211, 0.03);
  }
  .defi-accordion-item.active .defi-content p {
    opacity: 1;
    transform: translateY(0);
  }
  .defi-accordion-item.active .arrow-icon {
    transform: rotate(180deg);
  }
  /* Dark Mode */
body.dark .defi-accordion-item {
    background: rgba(255, 255, 255, 0.03);
  }
  /* Responsivo */
@media (max-width: 768px) {
    .defi-toggle {
      padding: 1rem;
      font-size: 1rem;
    }
    
    .defi-content {
      padding: 0 1rem;
    }
    
    .defi-accordion-item.active .defi-content {
      padding: 1.5rem;
    }
  }
  /* Remover fundo dos itens de lista no dark mode */
body.dark .simple-steps li,
body.dark .simple-list li,
body.dark .analogy-box p {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
/* Tamanho do Player Principal */
.video-player-wrapper {
    max-width: 1200px;
    margin: 0 auto 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0,0,0,0.2);
  }
  /* Modo escuro */
body.dark .video-player-wrapper {
    box-shadow: 0 8px 24px rgba(255,255,255,0.1);
  }
  /* Reset do iframe */
.video-player iframe {
    background: #000;
    transition: opacity 0.5s ease;
  }
  
  .video-player iframe[src=""] {
    opacity: 0;
  }
  
  /* Efeito de transição */
  .video-swap-active {
    transform: scale(0.98);
    opacity: 1;
  }
  