/* Geospatial Data Converter Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

main {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

section {
    padding: 30px;
}

section:not(:last-child) {
    border-bottom: 1px solid #ecf0f1;
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: #95a5a6;
    margin-bottom: 15px;
}

.upload-content p {
    margin-bottom: 10px;
    color: #7f8c8d;
}

.upload-content button {
    background: none;
    border: none;
    color: #3498db;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}

.file-info {
    font-size: 0.9rem;
    color: #95a5a6;
}

/* Format Selection */
.format-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.format-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.format-options label:hover {
    border-color: #3498db;
}

.format-options input[type="radio"] {
    margin-right: 10px;
}

.format-options input[type="radio"]:checked + span {
    color: #3498db;
    font-weight: 500;
}

/* Buttons */
.convert-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.convert-btn:hover:not(:disabled) {
    background: #2980b9;
}

.convert-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Status Section */
.transaction-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.transaction-info p {
    margin-bottom: 5px;
}

.transaction-info span {
    font-weight: 500;
    color: #2c3e50;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: #3498db;
    width: 0%;
    transition: width 0.3s ease;
}

/* File List */
.file-list {
    display: grid;
    gap: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.file-item.completed {
    border-left-color: #27ae60;
}

.file-item.failed {
    border-left-color: #e74c3c;
}

.file-name {
    font-weight: 500;
}

.file-status {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Download Area */
.download-area {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ecf0f1;
}

.download-link {
    background: #27ae60;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.download-link:hover {
    background: #229954;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .format-options {
        flex-direction: column;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
}

/* Error and Loading Overlays */
.error-overlay,
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.error-modal,
.loading-modal {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.error-modal h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-modal ul {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
}

.error-modal li {
    margin-bottom: 5px;
    color: #7f8c8d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-modal p {
    color: #7f8c8d;
    margin: 0;
}

/* Selected Files Display */
.selected-file {
    background: #f8f9fa;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    border-left: 3px solid #3498db;
    font-size: 0.9rem;
}

/* Enhanced File Items */
.file-item {
    transition: all 0.3s ease;
}

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

/* Status Description */
#statusDescription {
    font-style: italic;
    color: #7f8c8d;
    margin-top: 5px;
}