.tool-container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #2563eb;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Generator Layout */
.generator-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.config-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-panel {
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Decoder Layout */
.decoder-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

.upload-placeholder {
    color: #64748b;
}

.upload-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.upload-placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.sub-text {
    font-size: 0.9rem;
    color: #94a3b8;
}

#previewImage {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.result-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Common Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    resize: vertical;
    font-size: 0.95rem;
    font-family: inherit;
}

textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

input[type="number"], select {
    padding: 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #d1d5db;
    padding: 0.4rem;
    border-radius: 6px;
    background: white;
}

input[type="color"] {
    border: none;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    cursor: pointer;
}

.color-input-wrapper span {
    font-family: monospace;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Buttons */
.btn-primary {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .generator-layout {
        flex-direction: column;
    }
    .preview-panel {
        width: 100%;
    }
    .options-grid {
        grid-template-columns: 1fr;
    }
}

.btn-primary {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qr-display {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-display img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .generator-layout {
        flex-direction: column;
    }
    
    .preview-panel {
        width: 100%;
    }
}