/* Ogólne style */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
/* Dodaj te linie, aby zablokować rozciąganie ekranu */
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Zmodyfikowany nagłówek z logo */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f5f5f5; /* Ten sam kolor co tło strony */
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-image {
    max-width: 250px; /* Możesz dostosować rozmiar */
    height: auto;
}

/* Sekcja autoryzacji */
.auth-section {
    text-align: center;
    margin: 50px 0;
}

/* Sekcja wyszukiwania */
.search-section {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.search-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

select, input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Przyciski */
.primary-button {
    background-color: #0F3B68;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.primary-button:hover {
    background-color: #4479db;
}

.secondary-button {
    background-color: #0F3B68;
    color: white;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.secondary-button:hover {
    background-color: #4479db;
}

/* Wyniki wyszukiwania */
.results-section {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.tabs {
    display: flex;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s;
    flex: 1;
    color: #2e2e2e;
}

.tab-button:hover {
    background-color: #e4e4e4;
}

.tab-button.active {
    background-color: white;
    border-bottom: 3px solid #0F3B68;
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.file-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.file-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.file-icon {
    font-size: 40px;
    margin-bottom: 10px;
    color: #4285f4;
    text-align: center;
}

.file-name {
    font-size: 14px;
    text-align: center;
    word-break: break-word;
}

/* Sekcja podglądu pliku */
.viewer-section {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
}

.file-viewer {
    margin-top: 15px;
    height: 70vh;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

#file-viewer-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.file-thumbnail {
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.file-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Spinner ładowania */
.spinner {
    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;
}

.spinner-icon {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0F3B68;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsywność */
@media (max-width: 768px) {
    .search-controls {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
    }
    
    /* Usunięto zmianę kierunku dla zakładek, aby zawsze były poziomo */
    /* .tabs {
        flex-direction: column;
    } */
    
    .tab-button {
        font-size: 14px; /* Mniejsza czcionka na małych ekranach */
        padding: 10px 15px; /* Mniejsze pady na małych ekranach */
    }
    
    .file-viewer {
        height: 50vh;
    }
    
    .logo-image {
        max-width: 180px; /* Mniejszy rozmiar na urządzeniach mobilnych */
    }
}


/* Style dla ekranu startowego (splash screen) */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ddd; /* Kolor tła */
    display: flex;
    justify-content: center;
    align-items: center; 
    z-index: 1000;
  }
  
  .circular-video-container {
    width: 395px;
    height: 395px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #000000;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  }
  
  .circular-video-container img {
    position: absolute;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.55); /* Dodaj scale(0.8) aby zmniejszyć obraz o 20% */
    object-fit: cover;
  }

  /* Animacja znikania ekranu startowego */
@keyframes fadeOut {
    0% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }
  
  @keyframes shrinkCircle {
    0% {
      transform: scale(1);
      opacity: 1;
    }
    100% {
      transform: scale(0);
      opacity: 0;
    }
  }
  
  /* Klasa do animacji okrągłego kontenera wideo */
  .circular-video-container.shrink {
    animation: shrinkCircle 0.7s ease-in forwards;
  }
  
  /* Klasa do animacji całego ekranu startowego */
  #splash-screen.fade-out {
    animation: fadeOut 0.8s ease-in forwards;
  }

  /* Style dla początkowego ekranu z dwoma logo */
#initial-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ddd; /* Kolor tła dopasowany do theme-color */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Wyższy z-index niż splash screen */
  }
  
  .initial-logo-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Zmień z space-between na flex-start */
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    position: relative; /* Dodaj pozycjonowanie względne */
}

.pulsating-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px; /* Odległość od góry */
    scale: 0.7;
}

/* Zaktualizuj styl dla środkowego logo */
.static-logo-center-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px; /* 10px od pulsującego logo */
}

/* Zaktualizuj styl dla dolnego logo - użyj pozycjonowania absolutnego */
.static-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute; /* Absolutne pozycjonowanie */
    bottom: 20px; /* 20px od dołu */
    left: 0;
    right: 0;
}

/* Style dla środkowego obrazu */
.initial-logo-static-center {
    max-width: 90%;
    max-height: 25vh;
    object-fit: contain;
}
  
  .initial-logo-pulsate, .initial-logo-static {
    max-width: 90%;
    object-fit: contain;
  }
  
  .initial-logo-pulsate {
    max-height: 40vh;
  }
  
  .initial-logo-static {
    max-height: 30vh;
  }
  
  /* Animacja pulsowania tylko dla górnego logo */
  @keyframes pulsate {
    0% { 
      transform: scale(1);
      opacity: 1;
    }
    50% { 
      transform: scale(1.05);
      opacity: 0.7;
    }
    100% { 
      transform: scale(1);
      opacity: 1;
    }
  }
  
  .initial-logo-pulsate {
    animation: pulsate 2s ease-in-out infinite;
  }
  
  /* Animacja wygaszania dla ekranu logo */
  @keyframes fadeOutInitial {
    0% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }
  
  #initial-screen.fade-out {
    animation: fadeOutInitial 0.5s forwards;
  }


  .file-icon-img {
    width: 60px; /* lub inny preferowany rozmiar */
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Style dla formularza logowania */
.login-form {
    display: flex;
    flex-direction: column;
    max-width: 300px;
    margin: 0 auto;
}

/* Zwiększamy odstęp między polem hasła a przyciskiem */
.login-form .form-group {
    margin-bottom: 25px;
}

/* Style dla pola wprowadzania hasła */
#auth-password {
    padding: 15px 10px; /* Zwiększony padding w pionie */
    height: 50px; /* Ustawiona konkretna wysokość pola */
    font-size: 18px; /* Rozmiar czcionki */
    text-align: center; /* Wycentrowanie tekstu */
}

/* Placeholder wycentrowany */
#auth-password::placeholder {
    text-align: center;
}

/* Styl dla przycisku logowania */
#auth-button {
    margin-top: 20px; /* Dodatkowy odstęp od pola hasła */
    padding: 15px 20px; /* Zwiększony padding w pionie */
    height: 50px; /* Ustawiona konkretna wysokość przycisku */
    font-size: 20px; /* Zwiększony rozmiar czcionki (z 16px do 20px) */
    font-weight: bold; /* Pogrubienie tekstu dla lepszej widoczności */
    line-height: 20px; /* Wyśrodkowanie tekstu w pionie */
}