/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* ===== Site Header ===== */
.site-header {
    background-color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===== Site Footer ===== */
.site-footer {
    padding: 1rem 0;
    background: transparent;
}

.site-footer p {
    color: #4b5563;
    font-size: 0.875rem;
}

/* ===== App Container ===== */
.app-container {
    flex: 1;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: #3b82f6;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

.tagline {
    color: #6b7280;
    font-size: 1rem;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
}

/* ===== Drop Zone ===== */
.drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.drop-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: #3b82f6;
}

.drop-icon svg {
    width: 100%;
    height: 100%;
}

.drop-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.drop-subtext {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.browse-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.browse-btn:hover {
    background-color: #2563eb;
}

/* ===== File List ===== */
.file-list-container {
    margin-top: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    display: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.file-list-container.visible {
    display: block;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.file-list-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.file-count {
    font-size: 0.875rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.file-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.file-list::-webkit-scrollbar {
    width: 6px;
}

.file-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.file-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.15s ease;
    border: 1px solid #e5e7eb;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-item:hover {
    background: #f3f4f6;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

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

.file-name {
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.8rem;
    color: #6b7280;
}

.file-actions {
    display: flex;
    gap: 0.25rem;
}

.file-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    color: #6b7280;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    border: 1px solid #e5e7eb;
}

.file-action-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.file-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.file-action-btn.delete:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

.file-action-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== Actions ===== */
.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-secondary {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2563eb;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Status Message ===== */
.status-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
    display: none;
}

.status-message.visible {
    display: block;
}

.status-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.status-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-message.loading {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.footer p {
    color: #6b7280;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer p::before {
    content: '🔒';
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .app-container {
        padding: 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .drop-icon {
        width: 48px;
        height: 48px;
    }

    .drop-text {
        font-size: 1rem;
    }

    .actions {
        flex-direction: column;
    }

    .file-name {
        max-width: 150px;
    }
}