:root {
    --primary: #0088cc;
    --primary-hover: #0077b5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-white: #f8fafc;
    --text-dim: #94a3b8;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 136, 204, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 136, 204, 0.1) 0px, transparent 50%);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px; /* Reduced from 20px */
}

.container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 16px; /* Reduced from 20px */
}

header {
    text-align: center;
    padding: 20px 0;
}

h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
}

.upload-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drop-zone:hover, .drop-zone.drag-active {
    border-color: var(--primary);
    background: rgba(0, 136, 204, 0.05);
    transform: scale(1.02);
}

.drop-zone i {
    font-size: 2rem;
    color: var(--primary);
}

.file-input {
    display: none;
}

.stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s ease;
}

.file-item:active {
    transform: scale(0.98);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.btn-download {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.progress-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s ease-out;
}

.progress-text {
    font-size: 0.75rem;
    color: #60a5fa;
    margin-top: 6px;
    text-align: right;
    font-weight: 600;
}

.btn-action {
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-action:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 400px;
}

input[type="password"], input[type="text"] {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    margin-bottom: 16px;
}

.badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    background: rgba(0, 136, 204, 0.2);
    color: #60a5fa;
}

.preview-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: #1e293b;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate {
    animation: fadeIn 0.4s ease forwards;
}

/* Mobile Optimizations */
@media (max-width: 400px) {
    body {
        padding: 12px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 16px;
        border-radius: 20px;
    }
    
    .drop-zone {
        padding: 30px 16px;
    }
    
    .file-item {
        padding: 12px;
        gap: 10px;
    }
    
    .preview-img {
        width: 36px;
        height: 36px;
    }
    
    .btn-download, .btn-delete {
        padding: 8px 10px;
    }
    
    .btn-action {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .modal {
        padding: 15px;
    }
}
