:root {
    --primary: #4361ee;
    --primary-hover: #3a0ca3;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --success: #4cc9f0;
    --border: #dee2e6;
    --error: #ff6b6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: var(--dark);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 25px;
}

h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--gray);
    font-size: 1rem;
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.drop-zone.highlight {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
}

.drop-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.small {
    font-size: 0.85rem;
    color: var(--gray);
    margin: 8px 0;
}

.select-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
    font-size: 1rem;
}

.select-btn:hover {
    background-color: var(--primary-hover);
}

#file-input {
    display: none;
}

.file-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 6px;
}

.file-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.convert-options {
    margin-bottom: 20px;
}

.convert-to-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--dark);
    font-size: 1.05rem;
}

.format-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.format-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: black;
}

.format-btn:hover {
    background: #f1f3f5;
}

.format-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.convert-btn, .download-btn, .another-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 1rem;
    min-width: 120px;
}

.convert-btn {
    background-color: var(--gray-light);
    color: var(--gray);
}

.convert-btn.active {
    background-color: var(--primary);
    color: white;
}

.convert-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
    color: white;
}

.download-btn {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.download-btn:hover:not(:disabled) {
    background-color: rgba(67, 97, 238, 0.1);
}

.download-btn:disabled {
    border-color: var(--border);
    color: var(--gray);
    cursor: not-allowed;
}

.another-btn {
    background-color: var(--light);
    color: var(--dark);
    border: 1px solid var(--border);
}

.another-btn:hover {
    background-color: var(--gray-light);
}

.status-message {
    font-size: 0.9rem;
    color: var(--gray);
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    background-color: var(--light);
}

.error-message {
    display: none;
    background: #fff3f3;
    border-left: 4px solid var(--error);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

.error-message p {
    color: #d32f2f;
    margin-bottom: 15px;
}

.error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    border: none;
    min-width: 100px;
}

.action-btn {
    background: var(--primary);
    color: white;
}

.action-btn.secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

@media (max-width: 500px) {
    .container {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .convert-btn, .download-btn, .another-btn {
        width: 100%;
    }
}