/* Flat Style Overrides for Catalog Homepage - Dashed Borders */

:root {
    /* Można dostosować kolory, jeśli obecne są zbyt jaskrawe */
    --flat-border-color: #444; /* Ciemniejszy, mniej jaskrawy kolor ramki */
    --flat-background-light: #222; /* Lekko jaśniejsze tło dla niektórych elementów */
    --flat-background-medium: #1a1a1a;
    --flat-text-color: #ddd; /* Lekko stonowany biały */
    --flat-primary-accent: #00cc00; /* Nadal zielony, ale można stonować */
    --flat-secondary-accent: #cc00cc; /* Nadal magenta, ale można stonować */
    --flat-cyan-accent: #00cccc; /* Nadal cyan, ale można stonować */
    --text-secondary: #aaa; /* Kolor drugorzędnego tekstu */
}

body {
    /* Upewnijmy się, że podstawowe tło jest ciemne */
    background-color: #0a0a0a; /* Bardzo ciemne tło */
    color: var(--flat-text-color);
    font-family: 'VT323', monospace; /* Upewnienie się, że czcionka jest ustawiona */
    line-height: 1.4;
    margin: 0;
    padding: 1rem;
    overflow-x: hidden;
}

.ascii-container {
    /* Zmieniono ramkę kontenera na bardziej subtelną */
    border: 1px solid var(--flat-border-color);
    box-shadow: none; /* Usunięcie cienia */
    background-color: #111;
    max-width: 1400px;
    margin: 1rem auto;
    padding: 1rem; /* Dodano padding do kontenera */
    box-sizing: border-box;
}

/* --- Sekcja Hero --- */
.hero-section {
    /* Używamy przerywanej ramki dolnej */
    border-bottom: 1px dashed var(--flat-primary-accent);
    background: transparent; /* Usunięto tło */
    padding: 1.5rem 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero-section h1 {
    color: var(--flat-primary-accent);
    text-shadow: none; /* Usunięcie cienia tekstu */
    animation: none; /* Usunięcie animacji */
    font-size: 2.2rem; /* Lekko mniejszy */
    margin: 0 0 0.5rem 0;
}

.hero-section .subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    border-right: none !important; /* Usunięcie kursora maszyny do pisania */
    animation: none !important;
    white-space: normal !important; /* Normalne zawijanie tekstu */
    overflow: visible !important;
    margin-bottom: 1.5rem;
}

/* --- Sekcja Wyszukiwania --- */
.search-control-panel {
    /* Zastosowanie ramki z kresek */
    border: 1px dashed var(--flat-secondary-accent); /* Magenta dashed border */
    background-color: transparent; /* Usunięto tło */
    box-shadow: none;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 0; /* Usunięto zaokrąglenie */
}

.search-header {
    color: var(--flat-secondary-accent);
    text-shadow: none;
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.search-form-extended {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.8rem;
    margin-bottom: 1rem; /* Zmniejszono margines, bo usunięto sekcję sortowania */
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    color: var(--flat-secondary-accent);
    opacity: 0.6;
    pointer-events: none;
}

#search-input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    background-color: #0a0a0a;
    border: 1px solid var(--flat-border-color);
    color: var(--flat-text-color);
    box-shadow: none;
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    border-radius: 3px; /* Lekkie zaokrąglenie pola */
    box-sizing: border-box;
}

#search-input:focus {
    border-color: var(--flat-primary-accent);
    box-shadow: none;
    background-color: #111;
    outline: none;
}

#clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 20px;
    display: none;
    padding: 0;
    line-height: 1;
}
#clear-search:hover {
    color: #fff;
}

/* Usunięto .filter-sort-options */

/* --- Wyniki Wyszukiwania --- */
#search-results-container {
    /* Ramka jest teraz opcjonalna, można ją usunąć lub zmienić */
    /* border: 1px dashed var(--flat-border-color); */ /* Subtelna ramka wokół wyników - USUNIĘTE */
    background-color: transparent; /* Usunięto tło */
    /* min-height: 100px; */ /* Zmniejszona minimalna wysokość - USUNIĘTE */
    /* padding: 0.5rem; */ /* USUNIĘTE */
    /* margin-top: 1rem; */ /* USUNIĘTE */
    border-radius: 0;
}

#search-results {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--flat-border-color) rgba(0,0,0,0.1);
}
#search-results::-webkit-scrollbar { width: 6px; }
#search-results::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 3px; }
#search-results::-webkit-scrollbar-thumb { background-color: var(--flat-border-color); border-radius: 3px; border: 1px solid rgba(0,0,0,0.1); }
#search-results::-webkit-scrollbar-thumb:hover { background-color: #555; }

.search-results-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.search-result-item {
    margin-bottom: 0;
    padding: 0;
    border-bottom: 1px dashed var(--flat-border-color); /* Zmieniono na dashed */
    animation: none;
}
.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item a {
    color: var(--flat-text-color);
    text-decoration: none;
    display: block;
    padding: 8px 5px;
    border-radius: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-left: 2px solid transparent;
}
.search-result-item a:hover {
    background-color: var(--flat-background-light);
    color: var(--flat-primary-accent);
}
.search-result-item.selected a {
    background-color: var(--flat-background-medium);
    border-left: 2px solid var(--flat-primary-accent);
}
.search-result-item .artist-name {
    font-weight: normal;
    color: var(--flat-text-color);
}
.search-result-item .genres-info {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-top: 2px;
    font-style: italic;
}
.search-result-item .genres-info .label {
     color: var(--flat-cyan-accent);
     font-style: normal;
}

/* Komunikat "Brak wyników" / Początkowy */
#search-results p.no-results-message {
    color: var(--text-secondary);
    text-align: center;
    padding: 15px;
    font-style: italic;
    font-size: 0.9rem;
}

/* Paginacja */
#pagination-controls {
    gap: 8px;
    margin: 1rem 0 0.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.pagination-button {
    background-color: transparent;
    color: var(--flat-primary-accent);
    border: 1px solid var(--flat-border-color);
    box-shadow: none;
    transform: none;
    padding: 5px 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pagination-button:hover:not(:disabled) {
    background-color: var(--flat-primary-accent);
    color: #000;
    border-color: var(--flat-primary-accent);
    box-shadow: none;
    transform: none;
}
.pagination-button:disabled {
    border-color: #333;
    color: #555;
    opacity: 0.6;
    cursor: default;
}
.page-counter {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Loading indicator */
.loading-indicator {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.spinner {
    border-top: 3px solid var(--flat-primary-accent);
    width: 20px;
    height: 20px;
    margin-bottom: 8px;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-indicator p {
    font-size: 0.9rem;
    color: var(--flat-primary-accent);
}

/* --- Sekcja Ostatnio Dodane --- */
.catalog-section {
    margin-top: 2rem;
}
.recent-section {
    border: 1px dashed var(--flat-cyan-accent);
    background: transparent;
    box-shadow: none;
    padding: 1rem;
    border-radius: 0;
}

/* --- ZMIANA: Usunięto pseudo-elementy z nagłówków sekcji --- */
.recent-section h3.section-header::before, .recent-section h3.section-header::after,
.alpha-browse-section h3.section-header::before, .alpha-browse-section h3.section-header::after,
.browse-results h4.results-header::before, .browse-results h4.results-header::after {
    content: none; /* Usunięcie ::: */
}
/* --- KONIEC ZMIANY --- */

.recent-section h3.section-header,
.alpha-browse-section h3.section-header,
.browse-results h4.results-header
{
    color: var(--flat-cyan-accent); /* Default color */
    text-shadow: none;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
}
.alpha-browse-section h3.section-header {
     color: var(--flat-primary-accent); /* Green for Browse */
}
.browse-results h4.results-header {
    color: var(--flat-primary-accent); /* Green for Browse Results */
     margin-top: 0;
     font-size: 1.2rem;
}


.section-header-line {
    height: 1px;
    background: var(--flat-border-color);
    width: 60%;
    margin: 5px auto 0;
}
.section-header-line::before { display: none; }
.visualizer-container { display: none; }

.recent-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
}

.recent-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px dashed var(--flat-border-color);
    background-color: transparent;
    border-radius: 0;
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.recent-item-link:hover {
    border-color: var(--flat-cyan-accent);
    background-color: rgba(0, 204, 204, 0.05);
}

.recent-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.album-cover {
    position: relative;
    height: 100px;
    overflow: hidden;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-bottom: 1px solid var(--flat-border-color);
}
.album-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.recent-item-link:hover .album-cover img {
    opacity: 0.9;
}
.album-cover.no-image i {
    font-size: 30px;
    color: var(--text-secondary);
}
.album-overlay { display: none; }

.recent-item-content {
    padding: 0.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.recent-item-content .artist-name,
.recent-item-content .track-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.recent-item-content .artist-name {
    color: var(--flat-text-color);
    font-size: 0.9rem;
    font-weight: normal;
    margin-bottom: 2px;
}
.recent-item-content .track-name {
    color: var(--text-secondary);
    font-size: 0.8rem;
}
.recent-item-timestamp {
    font-size: 0.7rem;
    color: var(--flat-cyan-accent);
    margin-top: 4px;
}
.recent-item-link:hover .artist-name { color: var(--flat-cyan-accent); }
.recent-item-link:hover .track-name { color: var(--flat-text-color); }
.item-hover-effect { display: none; }

/* --- Sekcja Przeglądania Alfabetycznego --- */
.alpha-browse-section {
    border: 1px dashed var(--flat-primary-accent);
    background: transparent;
    padding: 1rem;
    border-radius: 0;
}

.letter-nav {
    background-color: transparent;
    border: none;
    padding: 0.5rem 0;
    gap: 0.2rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.letter-nav a {
    border: 1px solid var(--flat-border-color);
    color: var(--text-secondary);
    background-color: #0a0a0a;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    box-shadow: none;
    transform: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.letter-nav a:hover, .letter-nav a.active {
    background-color: var(--flat-primary-accent);
    color: #000;
    border-color: var(--flat-primary-accent);
    box-shadow: none;
    transform: none !important;
}
.letter-nav a.active::after { display: none; }

/* --- Sekcja Wyników Przeglądania --- */
.browse-results {
    margin-top: 1rem;
    padding: 0;
    border: none;
    background-color: transparent;
    border-radius: 0;
    /* Dodajemy ID dla JS */
    scroll-margin-top: 20px; /* Odstęp od góry przy przewijaniu */
}

.artists-list-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.artist-link {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid var(--flat-border-color);
    background-color: #0a0a0a;
    color: var(--flat-text-color);
    text-decoration: none;
    border-radius: 2px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-size: 0.9rem;
}

.artist-link:hover {
    background-color: var(--flat-primary-accent);
    border-color: var(--flat-primary-accent);
    color: #000;
}

.tracks-list-container {
    /* Style dla kontenera listy utworów */
}

.track-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--flat-border-color);
    gap: 0.8rem;
}
.track-item:last-child {
    border-bottom: none;
}
.track-item .track-image {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background-color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--flat-border-color);
    border-radius: 2px;
}
.track-item .track-image img { max-width: 100%; max-height: 100%; object-fit: cover; }
.track-item .track-image i { font-size: 20px; color: var(--text-secondary); }
.track-item .track-info { flex-grow: 1; overflow: hidden; }
.track-item .track-info a {
    color: var(--flat-text-color);
    text-decoration: none;
    font-size: 1rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-item .track-info a:hover { color: var(--flat-primary-accent); }
.track-item .track-genres {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Inne --- */
hr.section-divider {
    background: var(--flat-border-color);
    opacity: 1;
    margin: 1.5rem 0;
    height: 1px;
    border: none;
}

.link-button {
    border-radius: 3px;
    padding: 6px 12px;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-width: 1px;
    border-style: solid;
}
.link-button i { line-height: 1; }
.link-button-amazon {
    color: #ff9900;
    border-color: #ff9900;
    background-color: transparent;
    box-shadow: none;
    animation: none;
    transform: none !important;
}
.link-button-amazon:hover {
    background-color: #ff9900;
    color: #000;
    box-shadow: none;
    transform: none !important;
}

/* Stopka */
footer {
    border-top: 1px solid var(--flat-border-color);
    background: var(--flat-background-medium);
    padding: 0.8rem;
    margin-top: 2rem;
    text-align: center;
}
.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Responsywność */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section .subtitle { font-size: 0.9rem; }
    .search-form-extended { grid-template-columns: 1fr; }
    .search-button { width: 100%; }
    .recent-items { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .letter-nav a { width: 26px; height: 26px; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .hero-section { padding: 1rem 0.5rem; }
    .search-control-panel { padding: 0.8rem; }
    #search-input { padding: 10px 12px 10px 35px; font-size: 1rem; }
    .search-button { padding: 9px 15px; font-size: 1rem; }
    .recent-items { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.5rem; }
    .album-cover { height: 90px; }
    .recent-item-content { padding: 0.4rem; }
    .recent-item-content .artist-name { font-size: 0.8rem; }
    .recent-item-content .track-name { font-size: 0.75rem; }
    .recent-item-timestamp { font-size: 0.65rem; }
    .letter-nav a { width: 24px; height: 24px; font-size: 0.8rem; }
    .browse-results { padding: 0.5rem; }
    .artist-link { padding: 4px 8px; font-size: 0.85rem;}
    .track-item { gap: 0.5rem; }
    .track-item .track-image { width: 35px; height: 35px; }
    .track-item .track-info a { font-size: 0.9rem; }
    .track-item .track-genres { font-size: 0.75em; }
}
