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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: white;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 2em;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card h2 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.hint {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.qr-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s;
}

.qr-item:hover {
    transform: translateY(-5px);
}

.qr-code-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.qr-code-container img {
    max-width: 100%;
    height: auto;
}

.qr-item h3 {
    margin-bottom: 8px;
    color: #333;
    font-size: 1.1em;
}

.qr-stats {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.qr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.media-item {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
}

.media-item:hover {
    transform: translateY(-5px);
}

.media-content {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    background: #000;
}

.audio-container {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
}

.audio-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.audio-container audio {
    width: 100%;
}

.media-info {
    padding: 15px;
}

.media-filename {
    font-weight: 500;
    margin-bottom: 5px;
    word-break: break-word;
}

.media-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5em;
    }

    .card {
        padding: 20px;
    }

    .qr-grid,
    .media-grid {
        grid-template-columns: 1fr;
    }

    .qr-actions {
        flex-direction: column;
    }

    .qr-actions .btn {
        width: 100%;
    }
}

/* Make videos and images more mobile-friendly */
@media (max-width: 480px) {
    .media-content {
        max-height: 300px;
    }
}

/* Drop zone styles */
.drop-zone {
    border: 3px dashed #d0d0d0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.drop-zone:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.drop-zone-active {
    border-color: #667eea;
    background: #e8ebff;
    transform: scale(1.02);
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.drop-zone-text {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.drop-zone-hint {
    font-size: 14px;
    color: #666;
}

/* Upload queue styles */
#uploadQueue {
    margin-top: 20px;
}

.upload-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.upload-item.upload-success {
    border-color: #28a745;
    background: #f0fff4;
}

.upload-item.upload-error {
    border-color: #dc3545;
    background: #fff5f5;
}

.upload-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.upload-icon {
    font-size: 32px;
    margin-right: 15px;
}

.upload-details {
    flex: 1;
}

.upload-filename {
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
    word-break: break-word;
}

.upload-size {
    font-size: 14px;
    color: #666;
}

.upload-progress-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: #667eea;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.upload-progress-fill.upload-progress-success {
    background: #28a745;
}

.upload-progress-fill.upload-progress-error {
    background: #dc3545;
}

.upload-status {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Mobile responsive for upload UI */
@media (max-width: 768px) {
    .drop-zone {
        padding: 30px 20px;
    }

    .drop-zone-icon {
        font-size: 36px;
    }

    .drop-zone-text {
        font-size: 16px;
    }

    .upload-icon {
        font-size: 28px;
        margin-right: 10px;
    }
}
