:host(){
  width: 460px;
  display: block;
  max-width: 100%;
}

// Header
.header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.8rem;
  border-radius: 4px;

  .header-icon {
    font-size: 2rem;
    flex-shrink: 0;
  }

  .header-content {
    flex: 1;

    h3 {
      margin: 0;
      font-size: 1rem;
      color: #fff;
      font-weight: 600;
    }

    .subtitle {
      margin: 0.2rem 0 0 0;
      font-size: 0.75rem;
      color: rgba(255, 255, 255, 0.6);
    }
  }
}

// Kontrol Alanı
.kontrol-alan {
  display: flex;
  gap: 0.6rem;
  padding: 0 0.8rem 0.8rem;
  align-items: center;

  .ara-input {
    flex: 1;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    font-size: 0.85rem;

    &::placeholder {
      color: rgba(255, 255, 255, 0.4);
    }

    &:focus {
      outline: none;
      border-color: rgba(52, 152, 219, 0.5);
      background: rgba(52, 152, 219, 0.05);
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }

  .kontrol-butonlar {
    display: flex;
    gap: 0.4rem;
  }

  .yenile-btn {
    padding: 0.5rem 0.8rem;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;

    &:hover:not(:disabled) {
      background: rgba(46, 204, 113, 0.2);
      border-color: rgba(46, 204, 113, 0.5);
      transform: scale(1.05);
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }
}

// Dosya Container
.dosya-container {
  padding: 0 0.8rem;

  .durum-mesaj {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-size: 0.9rem;

    .spinner {
      width: 30px;
      height: 30px;
      border: 3px solid rgba(52, 152, 219, 0.2);
      border-top-color: rgba(52, 152, 219, 0.8);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin-bottom: 1rem;
    }
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  .dosya-sayac {
    padding: 0.6rem 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
  }
}

// Dosya Item
.dosya-item {
  padding: 0.8rem;
  margin-bottom: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  transition: all 0.2s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(52, 152, 219, 0.3);
  }

  &.yuklendi {
    background: rgba(46, 204, 113, 0.05);
    border-color: rgba(46, 204, 113, 0.2);
  }

  .dosya-baslik {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;

    .dosya-bilgi {
      display: flex;
      align-items: center;
      gap: 0.8rem;
      flex: 1;
      min-width: 0;

      .dosya-icon {
        font-size: 1.5rem;
        flex-shrink: 0;

        &.wrl {
          filter: hue-rotate(200deg);
        }

        &.fikowrl {
          animation: pulse 2s ease-in-out infinite;
        }
      }

      .dosya-meta {
        flex: 1;
        min-width: 0;

        .dosya-adi {
          color: #fff;
          font-size: 0.9rem;
          font-weight: 500;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          margin-bottom: 0.2rem;
        }

        .dosya-boyut {
          color: rgba(255, 255, 255, 0.6);
          font-size: 0.75rem;
        }
      }
    }

    .islem-butonlari {
      display: flex;
      gap: 0.4rem;
      flex-shrink: 0;

      button {
        padding: 0.5rem 0.8rem;
        border-radius: 3px;
        border: none;
        cursor: pointer;
        font-size: 0.9rem;
        transition: all 0.2s ease;
        background: rgba(52, 152, 219, 0.1);
        color: #fff;

        &:hover:not(:disabled) {
          background: rgba(52, 152, 219, 0.2);
          transform: scale(1.05);
        }

        &:disabled {
          opacity: 0.5;
          cursor: not-allowed;
        }

        &.btn-3d {
          background: rgba(155, 89, 182, 0.1);
          border: 1px solid rgba(155, 89, 182, 0.3);

          &:hover:not(:disabled) {
            background: rgba(155, 89, 182, 0.2);
            border-color: rgba(155, 89, 182, 0.5);
          }
        }
      }
    }
  }

  .dosya-hata {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0;
    margin-top: 0.6rem;
    border-top: 1px solid rgba(231, 76, 60, 0.2);
    color: rgba(231, 76, 60, 0.8);
    font-size: 0.8rem;

    .hata-icon {
      flex-shrink: 0;
    }

    .hata-mesaj {
      flex: 1;
      word-break: break-word;
    }
  }

  .dosya-yol {
    padding: 0.6rem;
    margin-top: 0.6rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid rgba(52, 152, 219, 0.3);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 2px;
  }
}

// Sayfalama
.sayfalama {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.8rem;

  .sayfa-btn {
    padding: 0.5rem 0.8rem;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 3px;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;

    &:hover:not(:disabled) {
      background: rgba(52, 152, 219, 0.2);
      border-color: rgba(52, 152, 219, 0.5);
    }

    &:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }
  }

  .sayfa-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin: 0 0.4rem;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

// Math global
:global() {
  .Math {
    display: none;
  }
}
