/* Modern CSS Styling */
:root {
    --primary-color: #6c5ce7;
    --primary-light: #a29bfe;
    --secondary-color: #00cec9;
    --dark-color: #2d3436;
    --light-color: #f5f6fa;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #d63031;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--dark-color);
    line-height: 1.6;
}

.app-container {
    margin: 0 auto;
    padding: 0 20px;
}

.app-header {
    background-color: white;
    padding: 20px 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-left: 40px;
    margin-right: 40px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    background-image: url('../resurse/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    box-shadow: var(--box-shadow);
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.search-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 500px;
}

#searchBar {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dfe6e9;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 0.9rem;
    transition: var(--transition);
    min-width: 200px;
}

#searchBar:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: var(--primary-light);
}
.selected {
    outline: 3px solid var(--primary-color);
    box-shadow: 0 0 12px rgba(108, 92, 231, 0.3);
    position: relative;
    transform: scale(1.02);
    transition: var(--transition);
}

.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.action-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 12px 25px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.action-bar.active {
    opacity: 1;
    pointer-events: auto;
}

.action-bar button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.action-bar button:hover {
    background-color: var(--primary-light);
}

.app-main {
    padding: 30px 0;
}

.upload-section {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.upload-area {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.upload-label {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed #dfe6e9;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.upload-label:hover {
    border-color: var(--primary-light);
    background-color: rgba(108, 92, 231, 0.05);
}

.upload-label svg {
    margin-bottom: 10px;
    color: var(--primary-color);
}

#fileInput {
    display: none;
}

.upload-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    align-self: center;
}

.upload-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

#progressbar {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

#progressbar::-webkit-progress-bar {
    background-color: #dfe6e9;
    border-radius: 4px;
}

#progressbar::-webkit-progress-value {
    background-color: var(--success-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.categories-section {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    font-weight: 600;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.category-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid #dfe6e9;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.category-card h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
}
.fileDisplay, .videoDisplay, .imageDisplay {
    background-color: white;
    background-position: center;
    background-size: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid #dfe6e9;
    width: 100%;
    min-height: 300px;
}

.fileDisplay:hover,
.videoDisplay:hover,
.imageDisplay:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

/* Icon-style preview for file/music/app */
.fileIcon,
.musicIcon {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--border-radius);
}

/* Video styling for consistent UI */
.videoDisplay {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: var(--border-radius);
}

/* Music item text styling */
.music-name, .itemName {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-color);
    word-break: break-word;
}

/* Music player hidden until play */
.audio-element {
    width: 100%;
    margin-top: 10px;
    outline: none;
}

/* Folder grid container */
.folders-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.action-section {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.action-buttons select.action-select {
    padding: 10px 15px;
    border-radius: var(--border-radius);
    border: 1px solid #dfe6e9;
    font-size: 0.95rem;
    background-color: white;
    color: var(--dark-color);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.action-buttons select.action-select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .search-container {
        width: 100%;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .upload-area {
        flex-direction: column;
    }
    
    .upload-label, .upload-btn {
        width: 100%;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}