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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Segoe UI', sans-serif;
}

#tool-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    margin: 0 0 20px;
    color: #333;
    font-size: 20px;
}

.input-section {
    margin-bottom: 15px;
}

#drop-zone {
    width: 100%;
    height: 150px;
    border: 2px dashed #ccc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fafafa;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 8px;
}

#drop-zone:hover {
    background: #e3f2ff;
}

#drop-zone p {
    margin: 0;
    padding: 0;
    font-size: 16px;
    color: #666;
}

.input-section p {
    font-size: 16px;
    color: #333;
    text-align: center;
}

.preview-section {
    margin-bottom: 15px;
    margin-top: 20px;
}

.result {
    margin-bottom: 15px;
}

.result textarea {
    width: 100%;
    height: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.result label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.copy-actions {
    text-align: center;
    margin-bottom: 15px;
}

.actions button {
    margin: 0 5px;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: #f5f5f5;
    font-size: 14px;
}

#copy-btn,
#download-btn,
#clear-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 5px;
}

#copy-btn:hover,
#download-btn:hover,
#clear-btn:hover {
    background-color: #2563eb;
}

.dark-mode #tool-wrapper {
    background: #1a1a1a;
}

.dark-mode h1,
.dark-mode .result label,
.dark-mode p {
    color: #f0f0f0;
}

.dark-mode .result textarea {
    background: #222;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode .result textarea::placeholder {
    color: #666;
}

.dark-mode .result textarea::placeholder {
    color: #666;
}

@media (max-width: 768px) {
    #tool-wrapper {
        margin: 20px;
    }
}

#drop-zone {
    height: 150px;
}

#drop-zone:hover {
    background: #f0f8ff;
}

#preview-image {
    margin-top: 10px;
}

#drop-zone input[type="file"] {
    position: absolute;
    left: -99999px;
}
