body {
    margin: 0;
    padding: 20px;
    background: #c0c0c0;
    font-family: 'MS Sans Serif', sans-serif;
    background-image: 
        radial-gradient(circle at 25% 25%, #ffffff 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, #ffffff 1px, transparent 1px);
    background-size: 4px 4px;
    min-height: 100vh;
}

.window {
    max-width: 800px;
    margin: 0 auto;
    background: #c0c0c0;
}

.menu-bar {
    display: flex;
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    padding: 2px;
}

.menu-item {
    padding: 4px 8px;
    border: none;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.menu-item:hover {
    background: #0000ff;
    color: white;
}

.main-content {
    padding: 20px;
}

.drop-zone {
    border: 2px dashed #808080;
    border-radius: 4px;
    padding: 40px 20px;
    text-align: center;
    background: #ffffff;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.drop-zone.dragover {
    border-color: #0000ff;
    background: #e6f3ff;
}

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

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

.browse-btn {
    margin-top: 10px;
    padding: 8px 16px;
    pointer-events: auto;
}

.processing-options {
    margin-bottom: 20px;
}

.option-row {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-row label {
    min-width: 100px;
}

.file-list-container {
    margin-bottom: 20px;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px inset #c0c0c0;
    background: white;
    padding: 5px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    border-bottom: 1px solid #e0e0e0;
}

.file-item:last-child {
    border-bottom: none;
}

.file-status {
    font-weight: bold;
}

.file-status.pending {
    color: #808080;
}

.file-status.processing {
    color: #0000ff;
}

.file-status.completed {
    color: #008000;
}

.file-status.error {
    color: #ff0000;
}

.progress-container {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    border: 1px inset #c0c0c0;
    background: white;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0000ff, #0080ff);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 5px;
    font-size: 12px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.process-btn, .download-btn {
    padding: 10px 20px;
    font-size: 14px;
    min-width: 150px;
}

.process-btn:disabled, .download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.results-container {
    margin-top: 30px;
    border-top: 1px solid #808080;
    padding-top: 20px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.result-item {
    text-align: center;
    border: 1px inset #c0c0c0;
    padding: 10px;
    background: white;
}

.result-preview {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border: 1px solid #808080;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.result-preview img {
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.result-filename {
    font-size: 11px;
    margin-bottom: 5px;
    word-break: break-all;
}

.download-individual {
    font-size: 11px;
    padding: 2px 6px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.clear-btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* Responsive design */
@media (max-width: 600px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .option-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

