/* Základní reset a font */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: #1e1e2f;
    color: #fff;
}

/* HEADER */
header {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
header h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

/* MAIN */
main {
    padding: 30px 20px;
}

/* Nadpis */
h2 {
    text-align: center;
    font-size: 26px;
    margin-bottom: 25px;
    color: #f5f5f5;
}

/* Drag & drop box */
#dropzone {
    width: 100%;
    max-width: 600px;
    height: 180px;
    margin: 0 auto 30px auto;
    border: 3px dashed #6c5ce7;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c5ce7;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(108,92,231,0.1);
    transition: all 0.3s ease;
}
#dropzone.dragover {
    background: rgba(108,92,231,0.2);
    border-color: #00cec9;
    color: #00cec9;
    font-weight: 700;
    transform: scale(1.05);
}

/* Napovídací pole */
#search {
    padding:10px 15px;
    width:300px;
    border-radius:8px;
    border:none;
    box-shadow:0 2px 5px rgba(0,0,0,0.4);
    margin-bottom:20px;
    background:#2d2d44;
    color:#fff;
}
#suggestions {
    background:#2d2d44;
    position:absolute;
    z-index:1000;
    width:300px;
    border-radius:8px;
    display:none;
    color:#fff;
    max-height:250px;
    overflow-y:auto;
    box-shadow:0 5px 15px rgba(0,0,0,0.5);
}
#suggestions div {
    padding:10px;
    cursor:pointer;
    transition:0.2s;
}
#suggestions div:hover {
    background:#00cec9;
    color:#1e1e2f;
}

/* Seznam složek */
.folder-list {
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    margin-bottom:25px;
}
.folder-list a {
    padding:10px 20px;
    background:#6c5ce7;
    border-radius:8px;
    color:#fff;
    text-decoration:none;
    transition:0.3s;
    font-weight:600;
    text-transform:uppercase;
}
.folder-list a:hover {
    background:#00cec9;
    color:#1e1e2f;
}
.folder-list a.selected {
    background:#00cec9;
    font-weight:bold;
    transform: scale(1.05);
    box-shadow:0 8px 25px rgba(0,206,201,0.5);
}

/* Náhledy – grid */
#preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    justify-items: start;
}

/* Center preview při highlight */
#preview.highlight-view {
    justify-items: center;   /* centrování všech položek */
    gap: 35px;
}
#preview.highlight-view .item {
    margin: 0 auto;          /* každý obrázek uprostřed */
}

/* Karty obrázků */
.item {
    background: #2d2d44;
    border-radius: 15px;
    padding: 15px;
    width: 220px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
.item:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

/* Obrázky */
.item img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}
.item:hover img {
    transform: scale(1.05) rotate(1deg);
}

/* Název souboru */
.filename {
    font-weight: 600;
    font-size: 14px;
    color: #f5f5f5;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Inputy a select */
.item input, .item select {
    width: 90%;
    padding: 8px 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 14px;
    background: #3a3a5a;
    color: #fff;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
}
.item input:focus, .item select:focus {
    background: #454575;
    box-shadow: 0 0 8px #00cec9;
}

/* Zvýraznění obrázku po hledání */
.item.highlight {
    border: 3px solid #00cec9;
    box-shadow: 0 12px 35px rgba(0,206,201,0.7);
    transform: scale(1.05);
}

/* Tlačítka */
button {
    display: block;
    margin: 20px auto 10px auto;
    padding: 12px 28px;
    background: linear-gradient(135deg, #00cec9, #6c5ce7);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}
button:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

/* Smazat tlačítko */
button.delete {
    background:#e84118;
    box-shadow:0 5px 15px rgba(232,65,24,0.5);
}
button.delete:hover {
    transform: scale(1.05);
    box-shadow:0 10px 25px rgba(232,65,24,0.7);
}

/* FOOTER */
footer {
    background: linear-gradient(135deg, #6c5ce7, #00cec9);
    padding: 20px 0;
    text-align: center;
    color: #fff;
    font-size: 14px;
    margin-top: 40px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
}