.dark, .tpl-dark {

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  .sorteio-finalizado {
    padding: 40px 0;
    min-height: 100vh;
  }
  
  .sorteio-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
  }
  
  /* Área de Mídia */
  .sorteio-media {
    margin-bottom: 1rem;
    max-width: 700px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .sorteio-media__wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
  }

  .media-image-container {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    overflow: hidden;
  }

  .media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .media-video-container {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    overflow: hidden;
  }

  .media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
  }

  .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .status-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: #dc3545;
    color: white;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; 
  }

  .media-title-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
    padding: 2.5rem 0.75rem 0.75rem;
  }

  .media-title {
    color: white;
    text-align: left;
    font-weight: 800;
    font-size: 1.125rem;
  }

  .progress-bar {
    background-color: #28a745;
    height: 25px;
    width: 100%;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .progress-text {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  /* Botão Ver Meus Números */
  .sorteio-button {
    max-width: 700px;
    width: 100%;
    margin: 0 auto 24px;
  }
  
  .sorteio-button__info {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 3px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; 
    background-color: #3a4a5a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .sorteio-button__info:hover {
    background-color: #2d3a48;
  }
  
  .sorteio-icon {
    margin-right: 8px;
  }
  
  /* Grid de Informações */
  .sorteio-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
  }
  
  /* Card de Informações */
  .sorteio-card {
    background-color: #111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
  }
  
  .sorteio-card__header {
    padding: 16px 24px 8px;
    border-bottom: 1px solid #222;
  }
  
  .sorteio-card__title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
  }
  
  .sorteio-card__content {
    padding: 16px 24px;
  }
  
  .sorteio-info__item {
    margin-bottom: 15px;
  }
  
  .sorteio-info__item:last-child {
    margin-bottom: 0;
  }
  
  .sorteio-info__label {
    color: #aaa;
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 5px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  }
  
  .sorteio-info__value {
    color: #fff;
    font-size: 16px;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-weight: 550;
  }
  
  /* Tabs */
  .sorteio-tabs {
    margin-bottom: 32px;
  }
  
  .sorteio-tabs__header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }

  @media (min-width: 641px) {
    .sorteio-tabs__header.tabs-count-1 {
      grid-template-columns: 1fr;
    }

    .sorteio-tabs__header.tabs-count-2 {
      grid-template-columns: repeat(2, 1fr);
    }

    .sorteio-tabs__header.tabs-count-3 {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .sorteio-tab__label {
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    margin: 0;
  }

  .sorteio-tab__button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background-color: #222;
    color: #aaa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
  }

  .sorteio-tab__button:hover:not(.active) {
    background-color: #333a41cf;
  }

  .sorteio-tab__button.active {
    background-color: #3a4a5acf;
    color: white;
  }

  .sorteio-tab__button .sorteio-icon {
    margin-right: 8px;
  }

  .sorteio-tab__content {
    display: none;
    padding: 18px;
    color: #fff;
  }
  
  .sorteio-tab__content.active {
    display: block;
  }

  /* Títulos Grid */
  .sorteio-titulos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
  }
  
  /* Compradores Container */
  .sorteio-compradores-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
  }
  
  /* Títulos Premiados */
  .titulos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: .5rem;
    padding: 1rem 0;
  }

  .titulo-premio {
    display: flex;
    align-items: center;
    background-color: #e05d65;
    color: #222;
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.75rem;
    min-width: 170px;
  }

  .titulo-x-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    position: relative;
    width: 2.5rem;
  }

  .titulo-x {
    position: relative;
    width: 16px;
    height: 16px;
  }

  .titulo-x::before,
  .titulo-x::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #222;
    top: 50%;
    left: 0;
    border-radius: 1px;
  }

  .titulo-x::before {
    transform: translateY(-50%) rotate(45deg);
  }

  .titulo-x::after {
    transform: translateY(-50%) rotate(-45deg);
  }

  .titulo-separator {
    height: 2rem;
    width: 1px;
    background-color: rgba(34, 34, 34, 0.3);
    margin: 0.25rem 0;
  }

  .titulo-info {
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
    flex: 1;
    text-align: center;
    font-size: 12px;
    line-height: 15px;
  }

  .titulo-numero,
  .titulo-valor {
    text-decoration: line-through;
  }

  /* Maiores Compradores */
  .compradores-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
  }

  .comprador-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 180px;
  }

  .comprador-medal {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .comprador-nome {
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 400;
    margin-bottom: 0.55rem;
    color: #c2c2c2;
  }

  .comprador-numeros-btn {
    background-color: #28a745;
    color: #454545;
    font-weight: 700;
    width: 100%;
    padding: 0.32rem;
    border-radius: 50px;
    text-align: center;
    font-size: 10.5px;
  }

  /* Conteúdo Expansível */
  .tab-content-inner {
    position: relative;
    overflow: hidden;
  }

  .tab-content-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #111);
    pointer-events: none;
  }

  .ver-mais-btn {
    display: block;
    margin: 1rem auto 0;
    padding: 0.5rem 1rem;
    background-color: #3a4a5a;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    z-index: 10;
    position: relative;
  }

  .ver-mais-btn:hover {
    background-color: #2d3a48;
  }

  /* Novo layout para rifinhas */
  .rifinha {
    margin-bottom: 2rem;
  }

  .rifinha__card {
    background-color: #111;
    border: 1px solid #333;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  .rifinha__header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .rifinha__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
  }

  .rifinha__content {
    padding: 1rem 1.5rem;
  }

  /* Cards de prêmios */
  .rifinha__premio-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
  }
  
  .rifinha__premio {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    text-align: center;
    width: 280px;
    flex: 0 0 auto;
  }

  .rifinha__premio-header {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
  }

  .rifinha__premio-title {
    font-weight: 600;
    margin: 0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem; 
  }

  .rifinha__premio-trophy {
    margin-right: 0.5rem;
    font-size: 1.25rem;
  }

  .rifinha__premio-info {
    margin-bottom: 1rem;
  }

  .rifinha__premio-label {
    color: #aaa;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
  }

  .rifinha__premio-value {
    font-size: 1rem;
    color: #fff;
    font-weight: 500;
  }

  .rifinha__numero {
    background-color: rgba(40, 167, 69, 0.1);
    border-radius: 0.5rem;
    padding: 0.2rem;
    margin-bottom: 1rem;
    border: 1px solid #28a745;
  }

  .rifinha__numero-label {
    color: #aaa;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
  }

  .rifinha__numero-value {
    font-size: 1rem;
    color: #2ecc71;
    font-weight: 800;
  }

  .rifinha__divider {
    height: 1px;
    background-color: #333;
    margin: 0.75rem 0;
  }

  .rifinha__ganhador {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .rifinha__ganhador-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #3a4a5a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 0.75rem;
    flex-shrink: 0;
    color: #fff;
    font-size: 1rem;
  }

  .rifinha__ganhador-info {
    flex: 1;
    text-align: left;
  }

  .rifinha__ganhador-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #fff;
    font-size: 0.875rem;
  }

  .rifinha__ganhador-state {
    font-size: 0.875rem;
    color: #aaa;  
    font-weight: 600;
  }

  /* Versão responsiva */
  @media (max-width: 768px) {
    .rifinha__header {
      flex-direction: column;
      align-items: flex-start;
    }

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

  /* Versão compacta para dispositivos muito pequenos */
  @media (max-width: 480px) {
    .rifinha__premio {
      padding: 1rem;
    }

    .rifinha__ganhador-avatar {
      width: 2rem;
      height: 2rem;
      font-size: 0.875rem;
    }

    .rifinha__premio-value,
    .rifinha__numero-value {
      font-size: 1rem;
    }
  }

  /* Centraliza o header apenas quando for rifa (não rifinha) */
  .rifa-header-centered {
    justify-content: center;
  }

  /* Responsivo */
  @media (min-width: 641px) {
    .sorteio-info-grid {
      grid-template-columns: 1fr 1fr;
    }
  
    .sorteio-tab__button {
      font-size: 16px;
      justify-content: center;
    }
  }
  
  @media (max-width: 640px) {
    .sorteio-container {
      padding: 0 12px;
    }
  
    .sorteio-card__header {
      padding: 12px 16px 8px;
    }
  
    .sorteio-card__content {
      padding: 12px 16px;
    }
  
    .sorteio-tabs__header {
      grid-template-columns: 1fr;
      gap: 8px;
    }

    .sorteio-info-grid {
      grid-template-columns: 1fr;
    }
  
    .sorteio-tab__button {
      padding: 8px;
      font-size: 12px;
      justify-content: start;
    }

    .sorteio-tab__button .sorteio-icon {
      margin-right: 4px;
    }

    .sorteio-tab__content {
      padding: 12px;
    }

    .compradores-container {
      gap: 0.75rem;
    }

    .comprador-item {
      width: 100%;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      padding: 8px;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 8px;
    }

    .comprador-medal {
      margin-bottom: 0;
      margin-right: 8px;
    }

    .comprador-nome {
      margin-bottom: 0;
      text-align: left;
      flex: 1;
      margin-right: 8px;
    }

    .comprador-numeros-btn {
      width: auto;
      padding: 4px 12px;
    }
  }

  @media (min-width: 641px) and (max-width: 767px) {
    .sorteio-tabs__header {
      grid-template-columns: repeat(3, 1fr);
    }
  }
}