:root {
    --primary: #4a90e2;
    --success: #00c851;
    --error: #ff4444;
    --text: #2d3436;
    --gap: 1rem;
    --card: #ffffff;
    --muted: #adb5bd;
}

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

body {
    min-height: 100vh;
    display: flex;
    background: #f8f9fa;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.5;
    color: var(--text);
}
.container {
    flex: 1;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-container {
    background: var(--card);
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
    overflow: hidden;

}

.upload-section {
    padding: 0.75rem;
    text-align: center;
}

.upload-header {
    margin-bottom: 0.75rem;
}

.upload-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.upload-header i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    margin: 0.4rem 0 0;
}

@media (min-width: 768px) {
    .preview-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.panel h3 {
    font-weight: 600;
    margin-bottom: 0.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    justify-content: center;
}

.preview-container {
    position: relative;
    width: 100%;
    margin: 0;
    aspect-ratio: 1;
    border: 2px dashed var(--primary);
    border-radius: 1rem;
    overflow: hidden;
    background: #f8f9fa;
    max-width: 280px;
    margin: 0 auto;
    margin-top: 0.25rem;
}

@media (min-width: 768px) {
    .preview-container {
        max-width: 320px;
    }
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

.placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--muted);
}

.controls {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.btn.primary {
    background: var(--primary);
    color: white;
}

.btn.success {
    background: var(--success);
    color: white;
    font-size: 0.85rem;
}

.file-input input {
    display: none;
}

.file-info {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}

.progress-container {
    margin-top: 1.5rem;
    display: none;
}

.progress-bar {
    height: 0.5rem;
    background: #e9ecef;
    border-radius: 0.25rem;
    overflow: hidden;
}

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

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    margin-top: 0.4rem;
}

.feature-card {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
    transition: transform 0.2s;
}

.feature-card h3 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.feature-card p {
    font-size: 0.8rem;
    color: var(--muted);
}

.message-box {
    display: none;
    position: fixed;
    cursor: pointer;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.message-content {
    position: relative;
    background: white;
    max-width: 400px;
    max-height: 200px;
    margin: 20vh auto;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
}
/* Styles for the close button */
.close-btn {
    position: absolute;
    top: 0;
    font-size: 24px;
    color: #090909;
    cursor: pointer;
    transition: color 0.3s ease; /* Smooth color transition on hover */
}
.close-btn:hover {
    color: #e20e0e; /* Change color on hover */
}

@media (max-width: 767px) {
    .container {
        padding: 1rem;
    }
    
    .upload-section {
        padding: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }
}




/* Developer Credits Styles */
.developer-credits {
    margin-top: 0.75rem;
    text-align: center;
    padding: 0.75rem;
    background-color: #f5f5f5;
    border-radius: 8px;
  }
  
  .dev-link {
    color: #2c3e50;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
  }
  
  .dev-link:hover {
    color: #3498db;
  }
  
  .dev-link i {
    margin-right: 5px;
  }

/* Export controls */
.export-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0;
}
.export-controls label {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    font-size: 0.8rem;
}
.export-controls select {
    padding: 0.25rem 0.4rem;
    border-radius: .4rem;
    border: 1px solid #e3e6ea;
    font-size: 0.8rem;
}
.spacer {
    flex: 1 1 auto;
}

@media (max-width: 767px) {
    .export-controls {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .spacer {
        display: none;
    }
}

/* Dragover state */
#dropZone.dragover {
    outline: 2px dashed var(--success);
    outline-offset: -10px;
    border-color: var(--success);
}