:root {
    --bg-color: #030303;
    --bg-gradient: radial-gradient(circle at top left, #0a0a0a 0%, var(--bg-color) 100%);
    --panel-bg: rgba(10, 10, 15, 0.85);
    --panel-border: #00ffcc;
    --primary-color: #00ffcc;
    --primary-hover: #00cca3;
    --text-primary: #e0f2fe;
    --text-secondary: #00ffcc;
    --accent-red: #ff003c;
    --glass-shadow: 0 0 20px rgba(0, 255, 204, 0.15);
    --neon-glow: 0 0 10px rgba(0, 255, 204, 0.5), 0 0 20px rgba(0, 255, 204, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Courier New', monospace;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow-x: hidden;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1300px;
    height: 85vh;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    box-shadow: var(--neon-glow);
}

.upload-panel {
    flex: 1.2;
    transition: transform 0.3s ease;
}

.list-panel {
    flex: 1;
    overflow: hidden;
}

header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-weight: 800;
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
}

header h2 {
    font-weight: 600;
    font-size: 1.8rem;
}

header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.drop-area {
    flex: 1;
    border: 2px dashed rgba(0, 255, 204, 0.4);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(0, 255, 204, 0.05);
    cursor: pointer;
    position: relative;
}

.drop-area.highlight {
    border-color: var(--primary-color);
    background: rgba(0, 255, 204, 0.15);
    box-shadow: inset var(--neon-glow);
    transform: scale(1.02);
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.drop-area:hover .upload-icon {
    transform: translateY(-5px);
}

.drop-area h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.drop-area p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

#fileElem {
    display: none;
}

.btn {
    padding: 0.7rem 1.2rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: rgba(0, 255, 204, 0.1);
    color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
}

.btn-primary:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: var(--neon-glow);
    transform: translateY(-2px);
}

.btn-icon {
    background: rgba(0, 255, 204, 0.1);
    color: var(--primary-color);
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-color);
}

.btn-icon:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: var(--neon-glow);
}

.status-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.hidden {
    display: none !important;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

#status-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.file-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.file-list::-webkit-scrollbar {
    width: 6px;
}

.file-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 0.8rem;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.list-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-select {
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.sort-select option {
    background: var(--bg-color);
    color: var(--text-primary);
}

.file-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 1rem;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.file-item-left {
    display: flex;
    align-items: center;
    overflow: hidden;
    flex: 1;
}

.file-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.2rem;
}

.file-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.file-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.file-download {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
    white-space: nowrap;
    margin-left: 1rem;
}

.file-download:hover {
    color: #fff;
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--accent-red);
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 800px) {
    .container {
        flex-direction: column;
        height: auto;
    }

    .panel {
        min-height: 400px;
    }
}